
"Eric Niebler" <eric@boost-consulting.com> writes:
Gennadiy Rozental wrote:
"Eric Niebler" <eric@boost-consulting.com> wrote in message news:427652AD.1020900@boost-consulting.com...
Besides, eliminating the rvalue requirement won't simplify the code because much of that machinery is needed anyway to prevent the macro args from being reevaluated. The rvalue stuff practically falls out of that. Lets see: to support rvalues you need: # include <new> # include <boost/aligned_storage.hpp> # include <boost/utility/enable_if.hpp> # include <boost/type_traits/is_array.hpp> struct rvalue_probe template<typename T> struct simple_variant cheap_copy Quite a lot actually.
True, but much of this is only needed for the *const* rvalue stuff. If there were general agreement that there's fat to trim (is there?), dropping *const* rvalue support would be an easy target.
Don't do it! I plan to write some functions that return const rvalues. Plus, Scott Meyers recommends it, so you'll encounter it. -- Dave Abrahams Boost Consulting www.boost-consulting.com