ignore_unused.hpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland.
  2. //
  3. // Use, modification and distribution is subject to the Boost Software License,
  4. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. #ifndef BOOST_CORE_IGNORE_UNUSED_HPP
  7. #define BOOST_CORE_IGNORE_UNUSED_HPP
  8. #include <boost/config.hpp>
  9. namespace boost {
  10. #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
  11. template <typename... Ts>
  12. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts const& ...)
  13. {}
  14. template <typename... Ts>
  15. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  16. {}
  17. #else
  18. template <typename T1>
  19. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&)
  20. {}
  21. template <typename T1, typename T2>
  22. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&)
  23. {}
  24. template <typename T1, typename T2, typename T3>
  25. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&)
  26. {}
  27. template <typename T1, typename T2, typename T3, typename T4>
  28. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&)
  29. {}
  30. template <typename T1, typename T2, typename T3, typename T4, typename T5>
  31. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&, T5 const&)
  32. {}
  33. template <typename T1>
  34. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  35. {}
  36. template <typename T1, typename T2>
  37. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  38. {}
  39. template <typename T1, typename T2, typename T3>
  40. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  41. {}
  42. template <typename T1, typename T2, typename T3, typename T4>
  43. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  44. {}
  45. template <typename T1, typename T2, typename T3, typename T4, typename T5>
  46. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  47. {}
  48. #endif
  49. } // namespace boost
  50. #endif // BOOST_CORE_IGNORE_UNUSED_HPP