#include #include // The return type is a trailing decltype of the parameter. Only the // parameter name is in scope at that point, so this form is required. template auto describe(T const& t) -> decltype(t.size()) { return t.size(); } int main() { std::string_view greeting = "hello"; std::println("size: {}", describe(greeting)); return 0; }