comparison DEPENDENCIES/generic/include/boost/fusion/support/deduce.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
7 ==============================================================================*/ 7 ==============================================================================*/
8 8
9 #if !defined(BOOST_FUSION_SUPPORT_DEDUCE_HPP_INCLUDED) 9 #if !defined(BOOST_FUSION_SUPPORT_DEDUCE_HPP_INCLUDED)
10 #define BOOST_FUSION_SUPPORT_DEDUCE_HPP_INCLUDED 10 #define BOOST_FUSION_SUPPORT_DEDUCE_HPP_INCLUDED
11 11
12 #include <boost/fusion/support/config.hpp>
12 #include <boost/ref.hpp> 13 #include <boost/ref.hpp>
14
15 #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
16 #include <functional>
17 #endif
13 18
14 namespace boost { namespace fusion { namespace traits 19 namespace boost { namespace fusion { namespace traits
15 { 20 {
16 template <typename T> struct deduce; 21 template <typename T> struct deduce;
17 22
83 struct deduce<reference_wrapper<T> const & > 88 struct deduce<reference_wrapper<T> const & >
84 { 89 {
85 typedef T& type; 90 typedef T& type;
86 }; 91 };
87 92
93 // Also unwrap C++11 std::ref if available (referencee cv is deduced)
94 #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
95 template <typename T>
96 struct deduce<std::reference_wrapper<T> &>
97 {
98 typedef T& type;
99 };
100
101 template <typename T>
102 struct deduce<std::reference_wrapper<T> const &>
103 {
104 typedef T& type;
105 };
106 #endif
107
88 // Keep references on arrays, even if const 108 // Keep references on arrays, even if const
89 109
90 template <typename T, int N> 110 template <typename T, int N>
91 struct deduce<T(&)[N]> 111 struct deduce<T(&)[N]>
92 { 112 {