Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah look at this eye watering line:

    using ret_t = first_non_void<decltype(fnc.template operator()<Elts>())...>;



Of all the C++ complexities that's not the one I would complain about. All it's doing is getting the first non-void declared return type of the operator() invocations, each specialized with the Elts template parameter. It reads basically as you'd write it in English. There's much more eye-watering stuff out there!


For me the following one is insane:

constexpr void operator>>(F fnc) const { (fnc.template operator()<Elts>(), ...); }


I think that the choice of overloading operator>> is from the blog author though, it is not from the introspection proposal.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: