My Project
integral_constant.hpp
Go to the documentation of this file.
1 
28 #ifndef BSL_INTEGRAL_CONSTANT_HPP
29 #define BSL_INTEGRAL_CONSTANT_HPP
30 
31 namespace bsl
32 {
44  template<typename T, T v>
46  {
47  public:
51  using value_type = T;
52 
54  static constexpr value_type value{v};
55 
56  protected:
60  ~integral_constant() noexcept = default;
61 
68  constexpr integral_constant(integral_constant const &o) noexcept = default;
69 
76  constexpr integral_constant(integral_constant &&o) noexcept = default;
77 
85  constexpr integral_constant &operator=(integral_constant const &o) &noexcept = default;
86 
94  constexpr integral_constant &operator=(integral_constant &&o) &noexcept = default;
95  };
96 }
97 
98 #endif
constexpr bsl::uintmax v
defines "-v" verbose mode
Definition: debug.hpp:46
If the provided type is an array type (taking into account const qualifications), provides the member...
Definition: integral_constant.hpp:45
T value_type
provides the member typedef "value_type"
Definition: integral_constant.hpp:51
static constexpr value_type value
the type T that stores the integral constant
Definition: integral_constant.hpp:54