Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11959: boost::is_copy_constructible triggers copy constructor generation on Visual Studio 2013 Update 4
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-02-06 09:33:21
#11959: boost::is_copy_constructible triggers copy constructor generation on Visual
Studio 2013 Update 4
-------------------------------+-------------------------
Reporter: vivien.millet@⦠| Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: type_traits
Version: Boost 1.60.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+-------------------------
Comment (by anonymous):
Given:
{{{
class NoCopy
{
private:
NoCopy(const NoCopy&);
};
struct has_not6 : public NoCopy
{
has_not6(int a);
};
static_assert(!std::is_copy_constructible<has_not6>::value, "Ooops");
}}}
VC12 static asserts, but VC14 and gcc-4.9.2 pass as expected.
This is with cl version 18.00.31101.
The point is that an is_copy_constructible that returns the wrong value is
as useless as one that doesn't compile, given that you should only use the
trait if the copy-constructor is going to be used. The advantage of our
own version is that it does handle classes that derive from
boost::noncopyable correctly - removing that support would almost
certainly break quite a bit of boost code.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11959#comment:6> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC