https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101213
Bug ID: 101213 Summary: Improve support for decltype(std) Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: llvm at rifkin dot dev Target Milestone: --- Gcc treats decltype(std) as an integer. It only works in some situations though: // OK decltype(std) a; static_assert(std::is_same<int, decltype(a)>::value); // Not OK static_assert(std::is_same<int, decltype(std)>::value); // OK decltype(std) a; using b = decltype(a); using c = b; // Not OK using a = decltype(std); using b = a; decltype(std) foo(int a) {} // OK auto foo() -> decltype(std) {} // OK void foo(decltype(std) a) {} // Not OK // Not OK std::vector<decltype(std)> v; This bug is hilarious please improve support for it and make it a feature :) It's invaluable for code bowling and nerd sniping.