nullptr_v.hpp 947 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Range v3 library
  2. //
  3. // Copyright Eric Niebler 2013,2014.
  4. //
  5. // Use, modification and distribution is subject to the
  6. // Boost Software License, Version 1.0. (See accompanying
  7. // file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. // Project home: https://github.com/ericniebler/range-v3
  11. //
  12. #ifndef RANGES_V3_UTILITY_NULLPTR_V_HPP
  13. #define RANGES_V3_UTILITY_NULLPTR_V_HPP
  14. #include <range/v3/detail/config.hpp>
  15. RANGES_DEPRECATED_HEADER(
  16. "This header is deprecated and will be removed from a future version of range-v3.")
  17. #include <range/v3/detail/prologue.hpp>
  18. namespace ranges
  19. {
  20. /// \ingroup group-utility
  21. template<typename T>
  22. constexpr T * _nullptr_v()
  23. {
  24. return nullptr;
  25. }
  26. #if RANGES_CXX_VARIABLE_TEMPLATES
  27. /// \ingroup group-utility
  28. template<typename T>
  29. constexpr T * nullptr_v = nullptr;
  30. #endif
  31. } // namespace ranges
  32. #include <range/v3/detail/epilogue.hpp>
  33. #endif