File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ namespace mlib
4
+ {
5
+ template <typename T, T I> struct integral_constant {
6
+ static constexpr T value = I;
7
+ using value_type = T;
8
+
9
+ constexpr operator value_type () const noexcept { return value; }
10
+
11
+ constexpr auto operator ()() const noexcept { return value; }
12
+ };
13
+ } // namespace mlib
Original file line number Diff line number Diff line change 145
145
<ClInclude Include =" get_nth_element.hpp" />
146
146
<ClInclude Include =" index_sequence.hpp" />
147
147
<ClInclude Include =" inlin_if.hpp" />
148
+ <ClInclude Include =" integral_constant.hpp" />
148
149
<ClInclude Include =" loop.hpp" />
149
150
<ClInclude Include =" meta_struct.hpp" />
150
151
<ClInclude Include =" mlib.hpp" />
Original file line number Diff line number Diff line change 102
102
<ClInclude Include =" pack.hpp" >
103
103
<Filter >Header Files</Filter >
104
104
</ClInclude >
105
+ <ClInclude Include =" integral_constant.hpp" >
106
+ <Filter >Header Files</Filter >
107
+ </ClInclude >
105
108
</ItemGroup >
106
109
<ItemGroup >
107
110
<ClCompile Include =" Main.cpp" >
You can’t perform that action at this time.
0 commit comments