unwrap.hpp 929 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
  2. #define BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED
  3. // Copyright Peter Dimov and Multi Media Ltd 2001, 2002
  4. // Copyright David Abrahams 2001
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // (See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // See http://www.boost.org/libs/mpl for documentation.
  11. // $Id$
  12. // $Date$
  13. // $Revision$
  14. #include <boost/ref.hpp>
  15. #include <boost/mpl/aux_/config/gpu.hpp>
  16. namespace boost { namespace mpl { namespace aux {
  17. template< typename F >
  18. BOOST_MPL_CFG_GPU_ENABLED
  19. inline
  20. F& unwrap(F& f, long)
  21. {
  22. return f;
  23. }
  24. template< typename F >
  25. BOOST_MPL_CFG_GPU_ENABLED
  26. inline
  27. F&
  28. unwrap(reference_wrapper<F>& f, int)
  29. {
  30. return f;
  31. }
  32. template< typename F >
  33. BOOST_MPL_CFG_GPU_ENABLED
  34. inline
  35. F&
  36. unwrap(reference_wrapper<F> const& f, int)
  37. {
  38. return f;
  39. }
  40. }}}
  41. #endif // BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED