void.h 516 B

12345678910111213141516171819202122232425262728
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. #pragma once
  4. #include "opentelemetry/version.h"
  5. OPENTELEMETRY_BEGIN_NAMESPACE
  6. namespace nostd
  7. {
  8. namespace detail
  9. {
  10. template <class...>
  11. struct voider
  12. {
  13. using type = void;
  14. };
  15. } // namespace detail
  16. /**
  17. * Back port of std::void_t
  18. *
  19. * Note: voider workaround is required for gcc-4.8 to make SFINAE work
  20. */
  21. template <class... Tx>
  22. using void_t = typename detail::voider<Tx...>::type;
  23. } // namespace nostd
  24. OPENTELEMETRY_END_NAMESPACE