\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 5.0 - Handles and Circulators
Circulator/circulator_prog2.cpp
#include <cassert>
#include <vector>
#include <algorithm>
#include <CGAL/circulator.h>
typedef Container::iterator Iterator;
int main() {
std::vector<int> v;
v.push_back(5);
v.push_back(2);
v.push_back(9);
Circulator c( &v);
Container container( c);
std::sort( container.begin(), container.end());
Iterator i = container.begin();
assert( *i == 2);
i++; assert( *i == 5);
i++; assert( *i == 9);
i++; assert( i == container.end());
return 0;
}