summaryrefslogtreecommitdiff
path: root/boost/variant/detail
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:30:07 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2016-10-06 10:32:57 +0900
commit71d216b90256936a9638f325af9bc69d720e75de (patch)
tree9c5f682d341c7c88ad0c8e3d4b262e00b6fb691a /boost/variant/detail
parent733b5d5ae2c5d625211e2985ac25728ac3f54883 (diff)
downloadboost-71d216b90256936a9638f325af9bc69d720e75de.tar.gz
boost-71d216b90256936a9638f325af9bc69d720e75de.tar.bz2
boost-71d216b90256936a9638f325af9bc69d720e75de.zip
Imported Upstream version 1.59.0
Change-Id: I2dde00f4eca71df3eea9d251dcaecde18a6c90a5 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/variant/detail')
-rw-r--r--boost/variant/detail/element_index.hpp4
-rw-r--r--boost/variant/detail/has_result_type.hpp5
2 files changed, 6 insertions, 3 deletions
diff --git a/boost/variant/detail/element_index.hpp b/boost/variant/detail/element_index.hpp
index bd80bdd15c..8ea92ecc5e 100644
--- a/boost/variant/detail/element_index.hpp
+++ b/boost/variant/detail/element_index.hpp
@@ -16,6 +16,8 @@
#include "boost/variant/recursive_wrapper_fwd.hpp"
#include "boost/variant/variant_fwd.hpp"
+#include "boost/type_traits/remove_cv.hpp"
+#include "boost/type_traits/remove_reference.hpp"
#include "boost/mpl/find_if.hpp"
namespace boost { namespace detail { namespace variant {
@@ -42,7 +44,7 @@ struct element_iterator_impl :
template <class Variant, class T>
struct element_iterator :
- element_iterator_impl< typename Variant::types, T>
+ element_iterator_impl< typename Variant::types, typename boost::remove_reference<T>::type >
{};
template <class Variant, class T>
diff --git a/boost/variant/detail/has_result_type.hpp b/boost/variant/detail/has_result_type.hpp
index d3a78b1937..8ec3d361ee 100644
--- a/boost/variant/detail/has_result_type.hpp
+++ b/boost/variant/detail/has_result_type.hpp
@@ -3,7 +3,7 @@
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
-// Copyright (c) 2014 Antony Polukhin
+// Copyright (c) 2014-2015 Antony Polukhin
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
@@ -13,6 +13,7 @@
#define BOOST_VARIANT_DETAIL_HAS_RESULT_TYPE_HPP
#include "boost/config.hpp"
+#include "boost/type_traits/remove_reference.hpp"
namespace boost { namespace detail { namespace variant {
@@ -23,7 +24,7 @@ private:
typedef char yes;
typedef struct { char array[2]; } no;
- template<typename C> static yes test(typename C::result_type*);
+ template<typename C> static yes test(typename boost::remove_reference<typename C::result_type>::type*);
template<typename C> static no test(...);
public: