@@ -161,12 +161,12 @@ constexpr auto skat_game::operator=(skat_game&& that) noexcept -> skat_game& {
161
161
[[nodiscard]] auto skat_game::to_string_impl (cpp2::impl::in<std::string_view> prefix) const & -> std::string{
162
162
163
163
auto pref {cpp2::to_string (prefix)};
164
- if ((*this ) == diamonds) {return pref + " diamonds" ; }
165
- if ((*this ) == hearts) {return pref + " hearts" ; }
166
- if ((*this ) == spades) {return pref + " spades" ; }
167
- if ((*this ) == clubs) {return pref + " clubs" ; }
168
- if ((*this ) == grand) {return pref + " grand" ; }
169
- if ((*this ) == null) {return cpp2::move (pref) + " null" ; }
164
+ if ((*this ) == skat_game:: diamonds) {return pref + " diamonds" ; }
165
+ if ((*this ) == skat_game:: hearts) {return pref + " hearts" ; }
166
+ if ((*this ) == skat_game:: spades) {return pref + " spades" ; }
167
+ if ((*this ) == skat_game:: clubs) {return pref + " clubs" ; }
168
+ if ((*this ) == skat_game:: grand) {return pref + " grand" ; }
169
+ if ((*this ) == skat_game:: null) {return cpp2::move (pref) + " null" ; }
170
170
return " invalid skat_game value" ;
171
171
}
172
172
@@ -175,16 +175,16 @@ return "invalid skat_game value";
175
175
[[nodiscard]] auto skat_game::from_string (cpp2::impl::in<std::string_view> s) -> skat_game{
176
176
177
177
auto x {s};
178
- if (" diamonds" == x) {return diamonds; }
179
- else {if (" hearts" == x) {return hearts; }
180
- else {if (" spades" == x) {return spades; }
181
- else {if (" clubs" == x) {return clubs; }
182
- else {if (" grand" == x) {return grand; }
183
- else {if (" null" == cpp2::move (x)) {return null; }
178
+ if (" diamonds" == x) {return skat_game:: diamonds; }
179
+ else {if (" hearts" == x) {return skat_game:: hearts; }
180
+ else {if (" spades" == x) {return skat_game:: spades; }
181
+ else {if (" clubs" == x) {return skat_game:: clubs; }
182
+ else {if (" grand" == x) {return skat_game:: grand; }
183
+ else {if (" null" == cpp2::move (x)) {return skat_game:: null; }
184
184
#line 1 "pure2-enum.cpp2"
185
185
}}}}}
186
186
CPP2_UFCS (report_violation)(cpp2::type_safety, CPP2_UFCS (c_str)((" can't convert string '" + cpp2::to_string (s) + " ' to enum of type skat_game" )));
187
- return diamonds;
187
+ return skat_game:: diamonds;
188
188
}
189
189
190
190
[[nodiscard]] auto skat_game::from_code (cpp2::impl::in<std::string_view> s) -> skat_game{
@@ -223,8 +223,8 @@ constexpr auto janus::operator=(janus&& that) noexcept -> janus& {
223
223
[[nodiscard]] auto janus::to_string_impl (cpp2::impl::in<std::string_view> prefix) const & -> std::string{
224
224
225
225
auto pref {cpp2::to_string (prefix)};
226
- if ((*this ) == past) {return pref + " past" ; }
227
- if ((*this ) == future) {return cpp2::move (pref) + " future" ; }
226
+ if ((*this ) == janus:: past) {return pref + " past" ; }
227
+ if ((*this ) == janus:: future) {return cpp2::move (pref) + " future" ; }
228
228
return " invalid janus value" ;
229
229
}
230
230
@@ -233,12 +233,12 @@ constexpr auto janus::operator=(janus&& that) noexcept -> janus& {
233
233
[[nodiscard]] auto janus::from_string (cpp2::impl::in<std::string_view> s) -> janus{
234
234
235
235
auto x {s};
236
- if (" past" == x) {return past; }
237
- else {if (" future" == cpp2::move (x)) {return future; }
236
+ if (" past" == x) {return janus:: past; }
237
+ else {if (" future" == cpp2::move (x)) {return janus:: future; }
238
238
#line 1 "pure2-enum.cpp2"
239
239
}
240
240
CPP2_UFCS (report_violation)(cpp2::type_safety, CPP2_UFCS (c_str)((" can't convert string '" + cpp2::to_string (s) + " ' to enum of type janus" )));
241
- return past;
241
+ return janus:: past;
242
242
}
243
243
244
244
[[nodiscard]] auto janus::from_code (cpp2::impl::in<std::string_view> s) -> janus{
@@ -290,10 +290,10 @@ std::string sep {};
290
290
if ((*this ) == none) {return " (none)" ; }
291
291
292
292
auto pref {cpp2::to_string (prefix)};
293
- if (((*this ) & cached) == cached) {ret += sep + pref + " cached" ;sep = separator;}
294
- if (((*this ) & current) == current) {ret += sep + pref + " current" ;sep = separator;}
295
- if (((*this ) & obsolete) == obsolete) {ret += sep + pref + " obsolete" ;sep = separator;}
296
- if (((*this ) & cached_and_current) == cached_and_current) {ret += sep + cpp2::move (pref) + " cached_and_current" ;sep = separator;}
293
+ if (((*this ) & file_attributes:: cached) == file_attributes:: cached) {ret += sep + pref + " cached" ;sep = separator;}
294
+ if (((*this ) & file_attributes:: current) == file_attributes:: current) {ret += sep + pref + " current" ;sep = separator;}
295
+ if (((*this ) & file_attributes:: obsolete) == file_attributes:: obsolete) {ret += sep + pref + " obsolete" ;sep = separator;}
296
+ if (((*this ) & file_attributes:: cached_and_current) == file_attributes:: cached_and_current) {ret += sep + cpp2::move (pref) + " cached_and_current" ;sep = separator;}
297
297
return cpp2::move (ret) + " )" ;
298
298
}
299
299
@@ -304,11 +304,11 @@ return cpp2::move(ret) + ")";
304
304
auto ret {none};
305
305
do {{
306
306
for ( auto const & x : cpp2::string_util::split_string_list (s) ) {
307
- if (" cached" == x) {ret |= cached;}
308
- else {if (" current" == x) {ret |= current;}
309
- else {if (" obsolete" == x) {ret |= obsolete;}
310
- else {if (" cached_and_current" == x) {ret |= cached_and_current;}
311
- else {if (" none" == x) {ret |= none;}
307
+ if (" cached" == x) {ret |= file_attributes:: cached;}
308
+ else {if (" current" == x) {ret |= file_attributes:: current;}
309
+ else {if (" obsolete" == x) {ret |= file_attributes:: obsolete;}
310
+ else {if (" cached_and_current" == x) {ret |= file_attributes:: cached_and_current;}
311
+ else {if (" none" == x) {ret |= file_attributes:: none;}
312
312
else {goto BREAK_outer;}
313
313
#line 1 "pure2-enum.cpp2"
314
314
}}}}
@@ -320,7 +320,7 @@ return ret;
320
320
false
321
321
);
322
322
CPP2_UFCS (report_violation)(cpp2::type_safety, CPP2_UFCS (c_str)((" can't convert string '" + cpp2::to_string (s) + " ' to flag_enum of type file_attributes" )));
323
- return none;
323
+ return file_attributes:: none;
324
324
}
325
325
326
326
[[nodiscard]] auto file_attributes::from_code (cpp2::impl::in<std::string_view> s) -> file_attributes{
0 commit comments