|
Boost Users : |
Subject: Re: [Boost-users] [assign] Default list_of() behavior
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2010-08-06 15:55:43
Ryan McConnehey skrev:
> Thorsten Ottosen wrote:
>> Ryan McConnehey skrev:
>>> Thorsten Ottosen wrote:
>>>> Yes, the upcomming revision will fix this somehow without breaking
>>>> exisiting code.
>> no.
> If not 1.44, any idea what release it would appear?
No. Soon hopefully.
>> If you look at the definition of list_of(), then you can easily add
>> your own version that does what you want.
>
> namespace assign
> {
> //Current implementation
> template< class T >
> inline assign_detail::generic_list<T>
> list_of()
> {
> return assign_detail::generic_list<T>()( T() );
> }
> }
>
>
>
> Just put this version of list_of in my own namespace? Or is there a way
> to add this to the assign namespace?
>
> template< class T >
> inline assign_detail::generic_list<T>
> list_of()
> {
> return assign_detail::generic_list<T>()();
> }
create your own header, include the relevant headers from Boost.Assign.
Then open the assign namespace:
namespace boost { namespace assign {
// your code here
} }
but you have to choose a different name than list_of() if you use the
boost::assign namespace.
HTH
-Thorsten
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net