[boost.assign] RFC on small updates

Hi All, For the next revision of boost.assign I have planned the following changes: 1. all arguments are passed by const reference 2. support for boost.graph 3. list_of()'s type has begin() and end() member functions. These will now return a mutable iterator even though they are const. (to allow better use of anonymous arrays) 4. a new super-efficient version of list_of() which can be used whenever efficiency matters and when references needs to be forwarded. For example: template< class Range > typename Range::const_iterator max_element( const Range& r ) { return std::max_element( r.begin(), r.end() ); } ... int a=1,b=5,c=3,d=4,e=2,f=9,g=0,h=7; ... int& max = *max_element( list_of<8,int&>(a)(b)(c)(d)(e)(f)(g)(h) ); BOOST_CHECK_EQUAL( max, f ); max = 8; BOOST_CHECK_EQUAL( f, 8 ); The question is if we should allow list_of<5,T> where T is not a reference or if we should require a reference argument (for the sake of efficiency). Thanks for your feedback -Thorsten -- Thorsten Ottosen ---------------------------- Dezide Aps -- Intelligent Customer Support: www.dezide.com Aalborg University --- Decision Support Systems: http://www.cs.aau.dk/index2.php?content=Research/bss C++ Boost: www.boost.org C++ Standard: http://www.open-std.org/JTC1/SC22/WG21/

"Pavel Vozenilek" <pavel_vozenilek@hotmail.com> wrote in message news:cu3ogb$k5u$1@sea.gmane.org... | | "Thorsten Ottosen" wrote: | | > For the next revision of boost.assign I have planned | > the following changes: | > | [snip] | | Maybe ability to read data from a file | using lexical cast or like. | | Sometimes it would help with quick-and-dirty testing. could you give an example of what you had in mind? Thanks -Thorsten
participants (2)
-
Pavel Vozenilek
-
Thorsten Ottosen