On 04/09/2014 12:41 PM, Andrey Semashev wrote:
FWIW, there is BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS macro in Boost.Config just for this case. BOOST_DEFAULTED_FUNCTION takes it into account.
That's a good pointer. I will change noncopyable.hpp to include this flag: +++ boost/noncopyable.hpp 9 Apr 2014 17:05:09 -0000 @@ -23,7 +23,7 @@ class noncopyable { protected: -#ifndef BOOST_NO_DEFAULTED_FUNCTIONS +#if !defined(BOOST_NO_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) BOOST_CONSTEXPR noncopyable() = default; ~noncopyable() = default; #else Another possible fix would be to use BOOST_DEFAULTED_FUNCTION for the constructor and destructor, but I'm not sure what happens to 'BOOST_CONSTEXPR', which is not included with the '#else' version of the constructor. So, I'll try out the safer fix I suggested. I also didn't replace BOOST_NO_DEFAULTED_FUNCTIONS with BOOST_NO_CXX11_DEFAULTED_FUNCTIONS, not knowing the current preference. Anyway, I leave it to you to decide how to fix noncopyable.hpp for this minor incompatibility with an ancient compiler. Since BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS exists, it seems reasonable to use it where appropriate.