2014-08-14 22:54 GMT+04:00 Richard Hadsell
I am trying to upgrade from Boost 1.55 to 1.56. I get this error with G++ 4.5.1:
In file included from ...: .../boost/variant/static_visitor.hpp:52:24: error: 'boost::static_visitor<R>::static_visitor()' declared with non-public access cannot be defaulted in the class body .../boost/variant/static_visitor.hpp:53:25: error: 'boost::static_visitor<R>::~static_visitor()' declared with non-public access cannot be defaulted in the class body
<..>
In static_visitor.hpp change line 51 from
#ifndef BOOST_NO_DEFAULTED_FUNCTIONS
to
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
I think this would be appropriate for any non-public defaulted functions, not just the ones that trip up code I happen to compile.
Thanks for the bug report and for providing a patch! Fixed that issue in develop branch: https://github.com/boostorg/variant/commit/8f111d3126c5a706f0eca0b90f5e01c9a... -- Best regards, Antony Polukhin