Boost logo

Boost :

Subject: Re: [boost] [variant] static_visitor constructor error with boost 1.56.0 and g++ 4.5.1
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2014-08-15 03:50:16


2014-08-14 22:54 GMT+04:00 Richard Hadsell <hadsell_at_[hidden]>:

> 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/8f111d3126c5a706f0eca0b90f5e01c9a4601178

-- 
Best regards,
Antony Polukhin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk