Somehow I need an ordered set.

How to do this?

Any help appreciated.

 

Peter

 

 

#include <boost/mpl/set.hpp>

#include <boost/mpl/sort.hpp>

 

 

typedef boost::mpl::sort<

            boost::mpl::set<

                        boost::mpl::int_<1>,

                        boost::mpl::int_<5>,

                        boost::mpl::int_<3>

            >

>::type CFirstSet;

 

 

int main(int argc, char **argv)

{           CFirstSet s;

}

 

"The first point (using an init() function in preference to a constructor) is bogus. Using constructors and exception handling is a more general and systematic way of dealing with resource acquisition and initialization errors. This style is a relic of pre-exception C++." -- Stroustrup