std::template
Braden Ganetsky
CppCon 2026 Lightning Talk
Background info:
tok3n
Custom span type
Dependent names
The C++ Standard
## Is `std::template` ever valid? * As I write this, it is 20 minutes before my lightning talk * And I have no idea * So let's read the standard
[temp.names]
...
...
[class.conv.fct]
## So... is `std::template` ever syntactically valid? * I don't think so * `operator std::template basic_string_view
()` * I think this is a `conversion-function-id` * But that would preclude `operator T::template foo
()` too
Conclusion
## Is `std::template` needed per the standard? * No * Is `std::template`syntactically _valid_ at all? * The jury is still out * But it was fun to research anyway!
## Lessons learned * Play around with code * You may find fun bugs that look real * ...and have lots of fun doing it
Thank you!
Braden Ganetsky
braden@ganets.ky
GitHub @k3DW