You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
714B

  1. // Range v3 library
  2. //
  3. // Copyright Eric Niebler 2013-present
  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_STATIC_CONST_HPP
  13. #define RANGES_V3_UTILITY_STATIC_CONST_HPP
  14. namespace ranges
  15. {
  16. /// \ingroup group-utility
  17. template<typename T>
  18. struct static_const
  19. {
  20. static constexpr T value{};
  21. };
  22. /// \ingroup group-utility
  23. /// \sa `static_const`
  24. template<typename T>
  25. constexpr T static_const<T>::value;
  26. } // namespace ranges
  27. #endif