diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-11-12 22:06:33 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-11-12 22:06:33 +0100 |
commit | c81bdbdadc72b96dda3c4a120bfb189df62ece18 (patch) | |
tree | c8b348d22d891a70322ef9caed6001c949f301af /doc/snippets/Tutorial_std_sort.cpp | |
parent | 0105146915c62f732841bb63d5c2046ed7cb3864 (diff) |
Add manual doc on STL-compatible iterators
Diffstat (limited to 'doc/snippets/Tutorial_std_sort.cpp')
-rw-r--r-- | doc/snippets/Tutorial_std_sort.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/snippets/Tutorial_std_sort.cpp b/doc/snippets/Tutorial_std_sort.cpp new file mode 100644 index 000000000..8f893684a --- /dev/null +++ b/doc/snippets/Tutorial_std_sort.cpp @@ -0,0 +1,4 @@ +Array4i v = Array4i::Random().abs(); +cout << "Here is the initial vector v:\n" << v.transpose() << "\n"; +std::sort(v.begin(), v.end()); +cout << "Here is the sorted vector v:\n" << v.transpose() << "\n";
\ No newline at end of file |