@@ -73,6 +73,7 @@ class file_attributes {
73
73
public: auto static constexpr cached = cpp2::strict_value<cpp2::u8 ,file_attributes,1 >(1 );
74
74
public: auto static constexpr current = cpp2::strict_value<cpp2::u8 ,file_attributes,1 >(2 );
75
75
public: auto static constexpr obsolete = cpp2::strict_value<cpp2::u8 ,file_attributes,1 >(4 );
76
+ public: auto static constexpr cached_and_current = cpp2::strict_value<cpp2::u8 ,file_attributes,1 >(3 );
76
77
public: auto static constexpr none = cpp2::strict_value<cpp2::u8 ,file_attributes,1 >(0 );
77
78
public: [[nodiscard]] static auto size () -> auto;
78
79
public: [[nodiscard]] static auto to_string (cpp2::in<cpp2::strict_value<cpp2::u8 ,file_attributes,1 >> value) -> std::string;
@@ -88,7 +89,8 @@ public: explicit file_attributes();
88
89
// 1
89
90
// 2
90
91
// 4
91
- #line 21 "pure2-enum.cpp2"
92
+
93
+ #line 22 "pure2-enum.cpp2"
92
94
};
93
95
94
96
auto main () -> int;
@@ -142,14 +144,15 @@ rgb::rgb([[maybe_unused]] rgb&& that) noexcept{}
142
144
auto rgb::operator =([[maybe_unused]] rgb&& that) noexcept -> rgb& {
143
145
return *this ;}
144
146
rgb::rgb (){}
145
- [[nodiscard]] auto file_attributes::size () -> auto { return 4 ; }
147
+ [[nodiscard]] auto file_attributes::size () -> auto { return 5 ; }
146
148
[[nodiscard]] auto file_attributes::to_string (cpp2::in<cpp2::strict_value<cpp2::u8 ,file_attributes,1 >> value) -> std::string{
147
149
148
150
std::string ret {};
149
151
ret = " (" ;
150
152
if (CPP2_UFCS (has, value, cached)) {ret += " cached" ;}
151
153
if (CPP2_UFCS (has, value, current)) {ret += std::string (" , " ) + " current" ;}
152
154
if (CPP2_UFCS (has, value, obsolete)) {ret += std::string (" , " ) + " obsolete" ;}
155
+ if (CPP2_UFCS (has, value, cached_and_current)) {ret += std::string (" , " ) + " cached_and_current" ;}
153
156
if (CPP2_UFCS (has, value, none)) {ret += std::string (" , " ) + " none" ;}
154
157
if (CPP2_UFCS_0 (empty, ret)) {ret = " (invalid file_attributes enumerator value)" ;}
155
158
return ret + " )" ;
@@ -162,7 +165,7 @@ file_attributes::file_attributes([[maybe_unused]] file_attributes&& that) noexce
162
165
auto file_attributes::operator =([[maybe_unused]] file_attributes&& that) noexcept -> file_attributes& {
163
166
return *this ;}
164
167
file_attributes::file_attributes (){}
165
- #line 23 "pure2-enum.cpp2"
168
+ #line 24 "pure2-enum.cpp2"
166
169
auto main () -> int{
167
170
// x : skat_game = 9; // error, can't construct skat_game from integer
168
171
@@ -204,7 +207,7 @@ auto main() -> int{
204
207
205
208
x = skat_game::diamonds; // ok, can assign one skat_game from another
206
209
207
- auto f {file_attributes::current | file_attributes::cached };
210
+ auto f {file_attributes::cached_and_current };
208
211
f &= file_attributes::cached | file_attributes::obsolete;
209
212
210
213
auto f2 {file_attributes::cached};
0 commit comments