ignore_unused.hpp 907 B

12345678910111213141516171819202122232425262728293031323334
  1. ///////////////////////////////////////////////////////////////////////////////
  2. /// \file ignore_unused.hpp
  3. /// Definintion of ignore_unused, a dummy function for suppressing compiler
  4. /// warnings
  5. //
  6. // Copyright 2008 Eric Niebler. Distributed under the Boost
  7. // Software License, Version 1.0. (See accompanying file
  8. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. #ifndef BOOST_PROTO_DETAIL_IGNORE_UNUSED_HPP_EAN_03_03_2008
  10. #define BOOST_PROTO_DETAIL_IGNORE_UNUSED_HPP_EAN_03_03_2008
  11. #include <boost/config.hpp>
  12. #if defined(_MSC_VER)
  13. # pragma warning(push)
  14. # pragma warning(disable : 4714) // function 'xxx' marked as __forceinline not inlined
  15. #endif
  16. namespace boost { namespace proto
  17. {
  18. namespace detail
  19. {
  20. template<typename T>
  21. BOOST_FORCEINLINE void ignore_unused(T const &)
  22. {}
  23. }
  24. }}
  25. #if defined(_MSC_VER)
  26. # pragma warning(pop)
  27. #endif
  28. #endif