// clang-format off %:include %:include template constexpr auto endl_for(const::std::basic_ostreambitand)noexcept ->auto(bitand)(::std::basic_ostreambitand) ->::std::basic_ostreambitand<% return::std::endl; %> %:define resolve(func,arg) \ static_castdecltype(func(arg))>(func) %:define FWD(x) \ static_cast(x) auto hello()->char*<% static char world<::>="Hello, world!"; return world; %> static char*str<::><%hello(),hello(),hello(),hello(),hello(),hello(),hello(),hello(),%>; auto atrocity_main(int, decltype(str))->int<% std::apply(bitand::endl_for(std::cout), std::tie(std::cout<<0<:::str:>)); std::apply(bitand resolve(std::endl,(std::cout)), std::tie(std::cout<<1<:::str:>)); auto get_endl=<::>(auto and os)->decltype(auto)<% return::endl_for(FWD(os)); %>; auto hello=<::>(char*strs<::>,int index,auto and ostream,auto and func)->void<% FWD(func)(FWD(ostream)<); %>; auto apply=<::>(auto and f,auto and...args)->decltype(auto)<% return FWD(f)(FWD(args)...); %>; auto bind_front=<::>(auto and f,auto and a)->auto<% return<:bitand:>(auto and...args)->decltype(auto)<% return FWD(f)(FWD(a),FWD(args)...); %>; %>; auto get_str = <::>(auto and data, auto and key)->decltype(auto)<% return FWD(data)<:FWD(key):>; %>; auto insert = <::>(auto and os, auto and data)->decltype(auto)<% return FWD(os)<; apply(bind_front(bind_front(bind_front(hello, str), 2), std::cout), apply(get_endl, std::cout)); apply(bitand::endl_for(std::cout),std::cout<<3<:::str:>); apply(bitand resolve(std::endl,(std::cout)),std::cout<<4<:::str:>); apply(apply(get_endl, std::cout),std::cout<<5<:::str:>); get_endl(std::cout)(bind_front(insert, std::cout) (bind_front(get_str, 6)(str))); apply(apply(get_endl, std::cout), apply(bind_front(insert, std::cout), apply(bind_front(get_str, 7), str))); return int<%%>; %>