ignore_unused.hpp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
  11. #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
  12. template <typename... Ts>
  13. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts&& ...)
  14. {}
  15. #else
  16. template <typename... Ts>
  17. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts const& ...)
  18. {}
  19. #endif
  20. template <typename... Ts>
  21. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  22. {}
  23. #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
  24. template <typename T1>
  25. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&)
  26. {}
  27. template <typename T1>
  28. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&)
  29. {}
  30. template <typename T1, typename T2>
  31. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&)
  32. {}
  33. template <typename T1, typename T2>
  34. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&)
  35. {}
  36. template <typename T1, typename T2, typename T3>
  37. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&, T3&)
  38. {}
  39. template <typename T1, typename T2, typename T3>
  40. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&)
  41. {}
  42. template <typename T1, typename T2, typename T3, typename T4>
  43. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&, T3&, T4&)
  44. {}
  45. template <typename T1, typename T2, typename T3, typename T4>
  46. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&)
  47. {}
  48. template <typename T1, typename T2, typename T3, typename T4, typename T5>
  49. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1&, T2&, T3&, T4&, T5&)
  50. {}
  51. template <typename T1, typename T2, typename T3, typename T4, typename T5>
  52. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&, T5 const&)
  53. {}
  54. template <typename T1>
  55. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  56. {}
  57. template <typename T1, typename T2>
  58. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  59. {}
  60. template <typename T1, typename T2, typename T3>
  61. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  62. {}
  63. template <typename T1, typename T2, typename T3, typename T4>
  64. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  65. {}
  66. template <typename T1, typename T2, typename T3, typename T4, typename T5>
  67. BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused()
  68. {}
  69. #endif
  70. } // namespace boost
  71. #endif // BOOST_CORE_IGNORE_UNUSED_HPP