Boost logo

Boost :

Subject: Re: [boost] Can Boost accept libraries that works only with C++0xcompilers?
From: Christopher Jefferson (chris_at_[hidden])
Date: 2010-05-18 18:35:04


On 18 May 2010, at 21:41, Daniel James wrote:

> On 18 May 2010 20:53, vicente.botet <vicente.botet_at_[hidden]> wrote:
>>
>> I wanted just know if this was possible or not.
>
> I think it's possible, the guidelines aren't entirely clear:
>
> https://svn.boost.org/trac/boost/wiki/Guidelines/Requirements#Portability
>
> IMO it would be harmful to forbid it, since we should encourage
> innovative use of new features, but the library's rational would have
> to include a convincing justification. A possible example might be an
> allocator that only works with C++0x allocator_traits.

I hope some libraries will gain some C++0x extensions, in particular variadic methods allow for some nice tricks, I personally already use a variadic push_back

/// Push an arbitrary length list of elements onto the back of a container
template<typename T, typename... Args>
void push_back(T& t, const Args&... args)

and boost.assign can be made (in my opinion) much nicer looking, switching:

list_of(2)(3)(5)(7)(11); to list_of(2,3,5,7,11)

Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk