Horizon
static_const.hpp
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 
13 #ifndef RANGES_V3_UTILITY_STATIC_CONST_HPP
14 #define RANGES_V3_UTILITY_STATIC_CONST_HPP
15 
16 namespace ranges
17 {
19 
20  template<typename T>
21  struct static_const
22  {
23  static constexpr T value{};
24  };
25 
28  template<typename T>
29  constexpr T static_const<T>::value;
30 } // namespace ranges
31 
32 #endif
static constexpr T value
Definition: static_const.hpp:23
Definition: static_const.hpp:22