unwrap.hpp 915 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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: unwrap.hpp 49267 2008-10-11 06:19:02Z agurtovoy $
  12. // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
  13. // $Revision: 49267 $
  14. #include <boost/ref.hpp>
  15. namespace boost { namespace mpl { namespace aux {
  16. template< typename F >
  17. inline
  18. F& unwrap(F& f, long)
  19. {
  20. return f;
  21. }
  22. template< typename F >
  23. inline
  24. F&
  25. unwrap(reference_wrapper<F>& f, int)
  26. {
  27. return f;
  28. }
  29. template< typename F >
  30. inline
  31. F&
  32. unwrap(reference_wrapper<F> const& f, int)
  33. {
  34. return f;
  35. }
  36. }}}
  37. #endif // BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED