From b5c87084afaef42b2d058f68091be31988a6a874 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 13 Sep 2017 11:08:07 +0900 Subject: Imported Upstream version 1.64.0 Change-Id: Id9212edd016dd55f21172c427aa7894d1d24148b Signed-off-by: DongHun Kwak --- boost/variant/polymorphic_get.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'boost/variant/polymorphic_get.hpp') diff --git a/boost/variant/polymorphic_get.hpp b/boost/variant/polymorphic_get.hpp index 89fca36de7..1a98382be6 100644 --- a/boost/variant/polymorphic_get.hpp +++ b/boost/variant/polymorphic_get.hpp @@ -3,7 +3,7 @@ // See http://www.boost.org for updates, documentation, and revision history. //----------------------------------------------------------------------------- // -// Copyright (c) 2013-2015 Antony Polukhin +// Copyright (c) 2013-2017 Antony Polukhin // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at @@ -113,13 +113,15 @@ public: // visitor interfaces template pointer operator()(U& operand) const BOOST_NOEXCEPT { + typedef typename boost::remove_reference::type base_t; typedef boost::integral_constant< bool, - boost::mpl::or_< - boost::is_base_of, - boost::is_same, - boost::is_same::type, U > - >::value + ( + boost::is_base_of::value && + (boost::is_const::value || !boost::is_const::value) + ) + || boost::is_same::value + || boost::is_same::type, U >::value > tag_t; return this_type::get(operand, tag_t()); -- cgit v1.2.3