[Boost-bugs] [Boost C++ Libraries] #11479: BOOST_DEFAULTED_FUNCTION does not work on Visual Studio 2013

Subject: [Boost-bugs] [Boost C++ Libraries] #11479: BOOST_DEFAULTED_FUNCTION does not work on Visual Studio 2013
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-15 17:58:41


#11479: BOOST_DEFAULTED_FUNCTION does not work on Visual Studio 2013
------------------------------------+------------------------------
 Reporter: randomaccessiterator@… | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.58.0
 Severity: Problem | Keywords:
------------------------------------+------------------------------
 The following use case

 struct Foo {
     Foo(const Foo& other) : uptr(new int(*other.uptr)) {}
     BOOST_DEFAULTED_FUNCTION(Foo(Foo&& other), :
 uptr(std::move(other.uptr)){} );
     std::unique_ptr<int> uptr;
 };

 when compiled with Visual Studio 2013, causes the following error:


 error C2610: 'Foo::Foo(Foo &&)' : is not a special member function which
 can be defaulted


 VS 2012 picks up the fallback, so it works.

 It could be because of the following documented defect:
 https://msdn.microsoft.com/en-us/library/hh567368.aspx#rvref

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11479>
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:18 UTC