Subject: [boost] the Boost policy for protecting against "too perfect forwarding"
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2014-04-25 10:48:03
By "too perfect forwarding" I mean the issue described in either of the
In short, a perfect-forwarding constructor can inadvertently become a
better match than a copy constructor when we want to make a copy.
There are two ways for protecting against it:
1. enable_if -- to disable the unwanted overloads
2. Add additional constructor overloads.
(1) appears cleaner, but some compilers might not support SFINAE.
My question is if there is a consensus in Boost how to approach this
problem. Is Boost supposed to support compilers w/o SFINAE? (It looks so,
because we have macro BOOST_NO_SFINAE.
I can see Boost.Any just uses SFINAE for this purpose without any check.
Are there any compilers supported by Boost that have rvalue references but
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk