[Boost-bugs] [Boost C++ Libraries] #10215: Defaulted functions not fully supported in VC 2013

Subject: [Boost-bugs] [Boost C++ Libraries] #10215: Defaulted functions not fully supported in VC 2013
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-18 13:43:40


#10215: Defaulted functions not fully supported in VC 2013
-------------------------------------+-------------------------
 Reporter: leek@… | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: config
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------+-------------------------
 Hi all,
 Visual C++ 2013 has only partial support for defaulted functions:
 h t t p : / / m s d n . m i c r o s o f t . c o m / e n - u s / l i b r a
 r y / h h 4 0 9 2 9 3 . a s p x

 I received the following error while running bjam with Visual Studio 2013
 (but see further down for successful resolution):

 bjam --with-python python-debugging=off threading=multi variant=release
 link=shared address-model=64 toolset=msvc-12.0 stage

 --- hopefully irrelevant parts removed ---

 .\boost/graph/detail/adjacency_list.hpp(298) : error C2610:
 'boost::detail::stored_edge_property<Vertex,Property>::stored_edge_property(boost::detail::stored_edge_property<Vertex,Property>
 &&)' : is not a special member function which can be defaulted
         .\boost/graph/detail/adjacency_list.hpp(304) : see reference to
 class template instantiation
 'boost::detail::stored_edge_property<Vertex,Property>' being compiled

 ---- error end ----
 I then defined BOOST_NO_CXX_DEFAULTED_FUNCTIONS in
 boost/config/compilers/visualc.hpp and it appears that everything has
 compiled successfully. Perhaps there could be more fine-grained support
 for what VC 2013 supports and doesn't, but for me, it's not relevant, so
 here is my patch:

 Index: visualc.hpp
 ===================================================================
 --- visualc.hpp (revision 86799)
 +++ visualc.hpp (working copy)
 @@ -171,7 +171,6 @@
  // C++11 features supported by VC++ 12 (aka 2013).
  //
  #if _MSC_FULL_VER < 180020827
 -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
  # define BOOST_NO_CXX11_DELETED_FUNCTIONS
  # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
  # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
 @@ -194,6 +193,12 @@
  #define BOOST_NO_CXX11_USER_DEFINED_LITERALS
  #define BOOST_NO_CXX11_ALIGNAS
  #define BOOST_NO_CXX11_INLINE_NAMESPACES
 +//
 +// Although VC 2013 claims to support defaulted functions, it
 +// does not support the =default construct. See
 +// h t t p : / / m s d n . m i c r o s o f t . c o m / e n - u s / l i b
 r a r y / h h 4 0 9 2 9 3 . a s p x
 +//
 +#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS

  //
  // prefix and suffix headers:

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