@@ -73,6 +73,7 @@ class file_attributes {
7373public: auto static constexpr cached = cpp2::strict_value<cpp2::u8 ,file_attributes,1 >(1 );
7474public: auto static constexpr current = cpp2::strict_value<cpp2::u8 ,file_attributes,1 >(2 );
7575public: 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 );
7677public: auto static constexpr none = cpp2::strict_value<cpp2::u8 ,file_attributes,1 >(0 );
7778public: [[nodiscard]] static auto size () -> auto;
7879public: [[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();
8889 // 1
8990 // 2
9091 // 4
91- #line 21 "pure2-enum.cpp2"
92+
93+ #line 22 "pure2-enum.cpp2"
9294};
9395
9496auto main () -> int;
@@ -142,14 +144,15 @@ rgb::rgb([[maybe_unused]] rgb&& that) noexcept{}
142144auto rgb::operator =([[maybe_unused]] rgb&& that) noexcept -> rgb& {
143145 return *this ;}
144146rgb::rgb (){}
145- [[nodiscard]] auto file_attributes::size () -> auto { return 4 ; }
147+ [[nodiscard]] auto file_attributes::size () -> auto { return 5 ; }
146148[[nodiscard]] auto file_attributes::to_string (cpp2::in<cpp2::strict_value<cpp2::u8 ,file_attributes,1 >> value) -> std::string{
147149
148150std::string ret {};
149151ret = " (" ;
150152if (CPP2_UFCS (has, value, cached)) {ret += " cached" ;}
151153if (CPP2_UFCS (has, value, current)) {ret += std::string (" , " ) + " current" ;}
152154if (CPP2_UFCS (has, value, obsolete)) {ret += std::string (" , " ) + " obsolete" ;}
155+ if (CPP2_UFCS (has, value, cached_and_current)) {ret += std::string (" , " ) + " cached_and_current" ;}
153156if (CPP2_UFCS (has, value, none)) {ret += std::string (" , " ) + " none" ;}
154157if (CPP2_UFCS_0 (empty, ret)) {ret = " (invalid file_attributes enumerator value)" ;}
155158return ret + " )" ;
@@ -162,7 +165,7 @@ file_attributes::file_attributes([[maybe_unused]] file_attributes&& that) noexce
162165auto file_attributes::operator =([[maybe_unused]] file_attributes&& that) noexcept -> file_attributes& {
163166 return *this ;}
164167file_attributes::file_attributes (){}
165- #line 23 "pure2-enum.cpp2"
168+ #line 24 "pure2-enum.cpp2"
166169auto main () -> int{
167170 // x : skat_game = 9; // error, can't construct skat_game from integer
168171
@@ -204,7 +207,7 @@ auto main() -> int{
204207
205208 x = skat_game::diamonds; // ok, can assign one skat_game from another
206209
207- auto f {file_attributes::current | file_attributes::cached };
210+ auto f {file_attributes::cached_and_current };
208211 f &= file_attributes::cached | file_attributes::obsolete;
209212
210213 auto f2 {file_attributes::cached};
0 commit comments