Boost logo

Boost :

Subject: Re: [boost] Fwd: Re: [move] You can do it better: implementing push_back and handling implicit conversions
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2011-03-09 16:41:41


El 09/03/2011 21:32, Jeffrey Lee Hellrung, Jr. escribió:
> By "should fail", you mean "should fail to compile, according to the
> standard", and here "value" is not an object of the std::list
> value_type, but some other type that's convertible to value_type,
> correct? Again, just to clarify.

Right. The idea is also to have some macro to ease writing the same code
for both C++03 and C++0x, e.g., priv_push_back receives a BOOST_FWD_REF
param that can be forwarded both in C++03 and C++0x.

> Yes, it's a bit more ugly, but if you were to document this as a general
> technique or recommendation, I would ultimately let the container author
> decide whether to allow "placement construction".

Yes, this is a good idea.

Best,

Ion


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