Hi Mateusz, Peter, On Sat, Apr 27, 2019 at 10:32 PM Mateusz Loskot via Boost < boost@lists.boost.org> wrote:
On 19-04-26 01:05:12, Mateusz Loskot wrote:
(initially posted to
https://lists.boost.org/boost-users/2019/04/89778.php)
I prepared a lenghty MWE which reproduces my problem with type manipulation using MP11 that for some reason looses const-qualification on a ::type result
[...]
https://github.com/boostorg/mp11/blob/e5d6e0d0b991a99c71a2b8f5057d0f0a1a89e0...
#if https://github.com/boostorg/mp11/blob/e5d6e0d0b991a99c71a2b8f5057d0f0a1a89e0... !BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, < 40900 ) // g++ 4.7, 4.8 have difficulties with preserving top-level const BOOST_TEST_TRAIT_TRUE((std::is_same
, void const>)); BOOST_TEST_TRAIT_TRUE((std::is_same , int const[]>)); #endif Since GCC 4.8 is dying, it's a good idea to stop using it where MP11 + C++11 is required.
how about wrapping the const type in mp_identity as a workaround before doing transforms, and then unwrapping?