| 1 | /*============================================================================= |
| 2 | Copyright (c) 2014 Paul Fultz II |
| 3 | unwrap.h |
| 4 | Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 6 | ==============================================================================*/ |
| 7 | |
| 8 | #ifndef BOOST_HOF_GUARD_UNWRAP_H |
| 9 | #define BOOST_HOF_GUARD_UNWRAP_H |
| 10 | |
| 11 | #include <type_traits> |
| 12 | #include <functional> |
| 13 | |
| 14 | namespace boost { namespace hof { namespace detail { |
| 15 | |
| 16 | template <class T> |
| 17 | struct unwrap_reference |
| 18 | { |
| 19 | typedef T type; |
| 20 | }; |
| 21 | template <class T> |
| 22 | struct unwrap_reference<std::reference_wrapper<T>> |
| 23 | { |
| 24 | typedef T& type; |
| 25 | }; |
| 26 | |
| 27 | }}} // namespace boost::hof |
| 28 | |
| 29 | #endif |
| 30 | |