@@ -255,8 +255,8 @@ auto main() -> int{
255
255
// if x == 9 { } // error, can't compare skat_game and integer
256
256
// if x == rgb::red { } // error, can't compare skat_game and rgb color
257
257
258
- std::cout << (" x.to_string() is " + cpp2::to_string (CPP2_UFCS (to_string)(x)) + " \n " );
259
- std::cout << (" x2.to_string() is " + cpp2::to_string (CPP2_UFCS (to_string)(cpp2::move (x2))) + " \n " );
258
+ std::cout << " " + (" x.to_string() is " + cpp2::to_string (CPP2_UFCS (to_string)(x)) + " \n " ) + " " ;
259
+ std::cout << " " + (" x2.to_string() is " + cpp2::to_string (CPP2_UFCS (to_string)(cpp2::move (x2))) + " \n " ) + " " ;
260
260
261
261
std::cout << " with if else: " ;
262
262
if (x == skat_game::diamonds) { // ok, can compare two skat_games
@@ -288,17 +288,17 @@ auto main() -> int{
288
288
289
289
x = skat_game::diamonds; // ok, can assign one skat_game from another
290
290
291
- std::cout << (" file_attributes::cached.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(file_attributes::cached)) + " \n " );
292
- std::cout << (" file_attributes::current.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(file_attributes::current)) + " \n " );
293
- std::cout << (" file_attributes::obsolete.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(file_attributes::obsolete)) + " \n " );
294
- std::cout << (" file_attributes::cached_and_current.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(file_attributes::cached_and_current)) + " \n " );
291
+ std::cout << " " + (" file_attributes::cached.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(file_attributes::cached)) + " \n " ) + " " ;
292
+ std::cout << " " + (" file_attributes::current.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(file_attributes::current)) + " \n " ) + " " ;
293
+ std::cout << " " + (" file_attributes::obsolete.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(file_attributes::obsolete)) + " \n " ) + " " ;
294
+ std::cout << " " + (" file_attributes::cached_and_current.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(file_attributes::cached_and_current)) + " \n " ) + " " ;
295
295
296
296
file_attributes f {file_attributes::cached_and_current};
297
297
f &= file_attributes::cached | file_attributes::obsolete;
298
- std::cout << (" f. get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f)) + " \n " );
298
+ std::cout << " " + (" f. get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f)) + " \n " ) + " " ;
299
299
300
300
auto f2 {file_attributes::cached};
301
- std::cout << (" f2.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f2)) + " \n " );
301
+ std::cout << " " + (" f2.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f2)) + " \n " ) + " " ;
302
302
303
303
std::cout << " f is " << CPP2_UFCS (to_string)(f) << " \n " ;
304
304
std::cout << " f2 is " << CPP2_UFCS (to_string)(f2) << " \n " ;
@@ -308,11 +308,11 @@ auto main() -> int{
308
308
CPP2_UFCS (set)(f2, file_attributes::cached);
309
309
std::cout << " f2 is " << CPP2_UFCS (to_string)(f2) << " \n " ;
310
310
311
- std::cout << (" f. get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f)) + " \n " );
312
- std::cout << (" f2.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f2)) + " \n " );
311
+ std::cout << " " + (" f. get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f)) + " \n " ) + " " ;
312
+ std::cout << " " + (" f2.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f2)) + " \n " ) + " " ;
313
313
314
- std::cout << (" f is (f2) is " + cpp2::to_string (cpp2::impl::is (f, (f2))) + " \n " );
315
- std::cout << (" f2 is (f ) is " + cpp2::to_string (cpp2::impl::is (f2, (f))) + " \n\n " );
314
+ std::cout << " " + (" f is (f2) is " + cpp2::to_string (cpp2::impl::is (f, (f2))) + " \n " ) + " " ;
315
+ std::cout << " " + (" f2 is (f ) is " + cpp2::to_string (cpp2::impl::is (f2, (f))) + " \n\n " ) + " " ;
316
316
317
317
CPP2_UFCS (clear)(f, f2);
318
318
CPP2_UFCS (set)(f, file_attributes::current | f2);
@@ -321,12 +321,12 @@ auto main() -> int{
321
321
322
322
std::cout << " f is " << CPP2_UFCS (to_string)(f) << " \n " ;
323
323
std::cout << " f2 is " << CPP2_UFCS (to_string)(f2) << " \n " ;
324
- std::cout << (" f. get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f)) + " \n " );
325
- std::cout << (" f2.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f2)) + " \n " );
326
- std::cout << (" f == f2 is " + cpp2::to_string (f == f2 ) + " \n " );
327
- std::cout << (" f is (f2) is " + cpp2::to_string (cpp2::impl::is (f, (f2))) + " \n " );
328
- std::cout << (" f2 is (f ) is " + cpp2::to_string (cpp2::impl::is (f2, (f))) + " \n " );
329
- std::cout << (" (f & f2) == f2 is " + cpp2::to_string ((f & f2) == f2) + " \n " );
324
+ std::cout << " " + (" f. get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f)) + " \n " ) + " " ;
325
+ std::cout << " " + (" f2.get_raw_value() is " + cpp2::to_string (CPP2_UFCS (get_raw_value)(f2)) + " \n " ) + " " ;
326
+ std::cout << " " + (" f == f2 is " + cpp2::to_string (f == f2 ) + " \n " ) + " " ;
327
+ std::cout << " " + (" f is (f2) is " + cpp2::to_string (cpp2::impl::is (f, (f2))) + " \n " ) + " " ;
328
+ std::cout << " " + (" f2 is (f ) is " + cpp2::to_string (cpp2::impl::is (f2, (f))) + " \n " ) + " " ;
329
+ std::cout << " " + (" (f & f2) == f2 is " + cpp2::to_string ((f & f2) == f2) + " \n " ) + " " ;
330
330
331
331
std::cout << " inspecting f: " << [&] () -> std::string { auto && _expr = cpp2::move (f);
332
332
if (cpp2::impl::is (_expr, (file_attributes::current))) { if constexpr ( requires{" exactly 'current'" ;} ) if constexpr ( std::is_convertible_v<CPP2_TYPEOF ((" exactly 'current'" )),std::string> ) return " exactly 'current'" ; else return std::string{}; else return std::string{}; }
0 commit comments