diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:08:07 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:09:00 +0900 |
commit | b5c87084afaef42b2d058f68091be31988a6a874 (patch) | |
tree | adef9a65870a41181687e11d57fdf98e7629de3c /boost/variant/polymorphic_get.hpp | |
parent | 34bd32e225e2a8a94104489b31c42e5801cc1f4a (diff) | |
download | boost-b5c87084afaef42b2d058f68091be31988a6a874.tar.gz boost-b5c87084afaef42b2d058f68091be31988a6a874.tar.bz2 boost-b5c87084afaef42b2d058f68091be31988a6a874.zip |
Imported Upstream version 1.64.0upstream/1.64.0
Change-Id: Id9212edd016dd55f21172c427aa7894d1d24148b
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/variant/polymorphic_get.hpp')
-rw-r--r-- | boost/variant/polymorphic_get.hpp | 14 |
1 files changed, 8 insertions, 6 deletions
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 <typename U> pointer operator()(U& operand) const BOOST_NOEXCEPT { + typedef typename boost::remove_reference<Base>::type base_t; typedef boost::integral_constant< bool, - boost::mpl::or_< - boost::is_base_of<Base, U>, - boost::is_same<Base, U>, - boost::is_same<typename boost::remove_cv<Base>::type, U > - >::value + ( + boost::is_base_of<base_t, U>::value && + (boost::is_const<base_t>::value || !boost::is_const<U>::value) + ) + || boost::is_same<base_t, U>::value + || boost::is_same<typename boost::remove_cv<base_t>::type, U >::value > tag_t; return this_type::get(operand, tag_t()); |