OGLplus  (0.59.0) a C++ wrapper for rendering APIs

int_constant.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_INT_CONSTANT_HPP
10 #define EAGINE_INT_CONSTANT_HPP
11 
12 #include "identifier_t.hpp"
13 #include <type_traits>
14 
15 namespace eagine {
16 
19 template <bool B>
20 using bool_constant = std::integral_constant<bool, B>;
21 
24 template <int I>
25 using int_constant = std::integral_constant<int, I>;
26 
29 template <unsigned U>
30 using unsigned_constant = std::integral_constant<unsigned, U>;
31 
34 template <std::size_t S>
35 using size_constant = std::integral_constant<std::size_t, S>;
36 
40 template <identifier_t Id>
41 using id_constant = std::integral_constant<identifier_t, Id>;
42 
43 } // namespace eagine
44 
45 #endif // EAGINE_INT_CONSTANT_HPP
Common code is placed in this namespace.
Definition: eagine.hpp:21
std::integral_constant< bool, B > bool_constant
Alias for boolean constant type.
Definition: int_constant.hpp:20
std::integral_constant< unsigned, U > unsigned_constant
Alias for unsigned int constant type.
Definition: int_constant.hpp:30
std::integral_constant< std::size_t, S > size_constant
Alias for size_t constant type.
Definition: int_constant.hpp:35
std::integral_constant< int, I > int_constant
Alias for signed int constant type.
Definition: int_constant.hpp:25
std::integral_constant< identifier_t, Id > id_constant
Alias for identifier_t constant type.
Definition: int_constant.hpp:41

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).