
----- Original Message ----- From: "Joaquin M Lopez Munoz" <joaquin@tid.es> To: <boost@lists.boost.org> Sent: Saturday, November 13, 2010 1:37 PM Subject: Re: [boost]Minimizing Dependencies within Generic Classes for Faster and Smaller Programs
3. With these caveats, Boost.MultiIndex iterators can be said to be SCARY as long as they belong to the same category of index (ordered, hashed, sequenced, random.access) in some situations, not in others. <snip> but the following, which would be far more useful, does *not* work:
// example 2
typedef multi_index_container< int, indexed_by< ordered_unique<identity<int> >, ordered_non_unique<identity<int>,std::greater<int> >
multi_t;
multi_t::nth_index<0>::type::iterator it1; multi_t::nth_index<1>::type::iterator it2;
it1=it2;
I can see the utility of these kind of assignments, but I would not name them SCARY, as the types are different. I find however enough clear the approach you take in Boost.MultiIndex to achieve the same behavior via projections http://www.boost.org/doc/libs/1_44_0/libs/multi_index/doc/tutorial/basics.ht... Best, Vicente