https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93906
Bug ID: 93906 Summary: Add front end support for std::conditional<Cond, T, F>::type Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- As detailed in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1715r0.html there are significant compile-time costs to heavy use of std::conditional. The Microsoft compiler treats the std::conditional class template as a built-in type and expands std::conditional<true, T, F>::type to the type T, and std::conditional<false, T, F>::type to the type F, without actually instantiating the class template. This is anecdotally reported to be a huge advantage for compile times. Implementing a similar feature in G++ would benefit both libstdc++ and user code, and remove my motivation to replace most uses of std::conditional in libstdc++ code.