unwrap.hpp 735 B

1234567891011121314151617181920212223242526272829
  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. #ifndef BOOST_HOF_GUARD_UNWRAP_H
  8. #define BOOST_HOF_GUARD_UNWRAP_H
  9. #include <type_traits>
  10. #include <functional>
  11. namespace boost { namespace hof { namespace detail {
  12. template <class T>
  13. struct unwrap_reference
  14. {
  15. typedef T type;
  16. };
  17. template <class T>
  18. struct unwrap_reference<std::reference_wrapper<T>>
  19. {
  20. typedef T& type;
  21. };
  22. }}} // namespace boost::hof
  23. #endif