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 145145 <ClInclude Include =" get_nth_element.hpp" />
146146 <ClInclude Include =" index_sequence.hpp" />
147147 <ClInclude Include =" inlin_if.hpp" />
148+ <ClInclude Include =" integral_constant.hpp" />
148149 <ClInclude Include =" loop.hpp" />
149150 <ClInclude Include =" meta_struct.hpp" />
150151 <ClInclude Include =" mlib.hpp" />
Original file line number Diff line number Diff line change 102102 <ClInclude Include =" pack.hpp" >
103103 <Filter >Header Files</Filter >
104104 </ClInclude >
105+ <ClInclude Include =" integral_constant.hpp" >
106+ <Filter >Header Files</Filter >
107+ </ClInclude >
105108 </ItemGroup >
106109 <ItemGroup >
107110 <ClCompile Include =" Main.cpp" >
You can’t perform that action at this time.
0 commit comments