11module ;
2- #include < type_traits>
32
43export module mcpplibs.primitives.traits.policy;
54
@@ -10,7 +9,7 @@ enum class category { value, type, error, concurrency };
109template <typename P> struct traits {
1110 using policy_type = void ;
1211 static constexpr bool enabled = false ;
13- static constexpr category kind = static_cast <category>(-1 );
12+ static constexpr auto kind = static_cast <category>(-1 );
1413};
1514
1615struct checked_value {};
@@ -31,67 +30,67 @@ struct atomic {};
3130template <> struct traits <checked_value> {
3231 using policy_type = checked_value;
3332 static constexpr bool enabled = true ;
34- static constexpr category kind = category::value;
33+ static constexpr auto kind = category::value;
3534};
3635
3736template <> struct traits <unchecked_value> {
3837 using policy_type = unchecked_value;
3938 static constexpr bool enabled = true ;
40- static constexpr category kind = category::value;
39+ static constexpr auto kind = category::value;
4140};
4241
4342template <> struct traits <saturating_value> {
4443 using policy_type = saturating_value;
4544 static constexpr bool enabled = true ;
46- static constexpr category kind = category::value;
45+ static constexpr auto kind = category::value;
4746};
4847
4948template <> struct traits <strict_type> {
5049 using policy_type = strict_type;
5150 static constexpr bool enabled = true ;
52- static constexpr category kind = category::type;
51+ static constexpr auto kind = category::type;
5352};
5453
5554template <> struct traits <category_compatible_type> {
5655 using policy_type = category_compatible_type;
5756 static constexpr bool enabled = true ;
58- static constexpr category kind = category::type;
57+ static constexpr auto kind = category::type;
5958};
6059
6160template <> struct traits <transparent_type> {
6261 using policy_type = transparent_type;
6362 static constexpr bool enabled = true ;
64- static constexpr category kind = category::type;
63+ static constexpr auto kind = category::type;
6564};
6665
6766template <> struct traits <throw_error> {
6867 using policy_type = throw_error;
6968 static constexpr bool enabled = true ;
70- static constexpr category kind = category::error;
69+ static constexpr auto kind = category::error;
7170};
7271
7372template <> struct traits <expected_error> {
7473 using policy_type = expected_error;
7574 static constexpr bool enabled = true ;
76- static constexpr category kind = category::error;
75+ static constexpr auto kind = category::error;
7776};
7877
7978template <> struct traits <terminate_error> {
8079 using policy_type = terminate_error;
8180 static constexpr bool enabled = true ;
82- static constexpr category kind = category::error;
81+ static constexpr auto kind = category::error;
8382};
8483
8584template <> struct traits <single_thread> {
8685 using policy_type = single_thread;
8786 static constexpr bool enabled = true ;
88- static constexpr category kind = category::concurrency;
87+ static constexpr auto kind = category::concurrency;
8988};
9089
9190template <> struct traits <atomic> {
9291 using policy_type = atomic;
9392 static constexpr bool enabled = true ;
94- static constexpr category kind = category::concurrency;
93+ static constexpr auto kind = category::concurrency;
9594};
9695
9796template <typename P>
0 commit comments