static_assert( __cplusplus > 2023'00 ); #include "../template_for.h" #include #include #include #include static auto init= Alepha::Utility::enroll <=[] { using namespace Alepha::Testing::literals; using namespace Alepha::Testing::exports; struct Example { int x; std::string s; int y; }; "Can one `template_for` each over a simple struct and get the members into a string?"_test <=TableTest < []( Example ex ) { using Alepha::template_for; std::ostringstream oss; template_for( ex ) <=[&]( const auto &element ) { oss << element << std::endl; }; return oss.str(); } > ::Cases { { "Simple case", { { 42, "Hello World", 1138 } }, "42\nHello World\n1138\n" }, }; };