as_lvalue.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ///////////////////////////////////////////////////////////////////////////////
  2. /// \file as_lvalue.hpp
  3. /// Contains definition the as_lvalue() functions.
  4. //
  5. // Copyright 2008 Eric Niebler. Distributed under the Boost
  6. // Software License, Version 1.0. (See accompanying file
  7. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  8. #ifndef BOOST_PROTO_TRANSFORM_AS_LVALUE_HPP_EAN_12_27_2007
  9. #define BOOST_PROTO_TRANSFORM_AS_LVALUE_HPP_EAN_12_27_2007
  10. #include <boost/proto/proto_fwd.hpp>
  11. #if defined(_MSC_VER)
  12. # pragma warning(push)
  13. # pragma warning(disable : 4714) // function 'xxx' marked as __forceinline not inlined
  14. #endif
  15. namespace boost { namespace proto
  16. {
  17. namespace detail
  18. {
  19. template<typename T>
  20. BOOST_FORCEINLINE
  21. T &as_lvalue(T &t)
  22. {
  23. return t;
  24. }
  25. template<typename T>
  26. BOOST_FORCEINLINE
  27. T const &as_lvalue(T const &t)
  28. {
  29. return t;
  30. }
  31. }
  32. }}
  33. #if defined(_MSC_VER)
  34. # pragma warning(pop)
  35. #endif
  36. #endif