unwrap_reference.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. [auto_generated]
  3. boost/numeric/odeint/util/unwrap_reference.hpp
  4. [begin_description]
  5. unwrap_reference
  6. [end_description]
  7. Copyright 2009-2011 Karsten Ahnert
  8. Copyright 2009-2011 Mario Mulansky
  9. Distributed under the Boost Software License, Version 1.0.
  10. (See accompanying file LICENSE_1_0.txt or
  11. copy at http://www.boost.org/LICENSE_1_0.txt)
  12. */
  13. #ifndef BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED
  14. #define BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED
  15. #include <boost/numeric/odeint/config.hpp>
  16. #if BOOST_NUMERIC_ODEINT_CXX11
  17. #include <functional>
  18. #else
  19. #include <boost/ref.hpp>
  20. #endif
  21. namespace boost {
  22. #if BOOST_NUMERIC_ODEINT_CXX11
  23. template<typename T> class reference_wrapper;
  24. template<typename T> class unwrap_reference;
  25. #endif
  26. namespace numeric {
  27. namespace odeint {
  28. #if BOOST_NUMERIC_ODEINT_CXX11
  29. template<typename T>
  30. struct unwrap_reference
  31. {
  32. typedef typename std::remove_reference<T>::type type;
  33. };
  34. template<typename T>
  35. struct unwrap_reference< std::reference_wrapper<T> >
  36. {
  37. typedef typename std::remove_reference<T>::type type;
  38. };
  39. template<typename T>
  40. struct unwrap_reference< boost::reference_wrapper<T> >
  41. {
  42. typedef typename boost::unwrap_reference<T>::type type;
  43. };
  44. #else
  45. using ::boost::unwrap_reference;
  46. #endif
  47. namespace detail
  48. {
  49. #if BOOST_NUMERIC_ODEINT_CXX11
  50. using ::std::ref;
  51. #else
  52. using ::boost::ref;
  53. #endif
  54. }
  55. }
  56. }
  57. }
  58. #endif // BOOST_NUMERIC_ODEINT_UTIL_UNWRAP_REFERENCE_HPP_INCLUDED