https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88020
Bug ID: 88020 Summary: Template argument deduction fails inside sizeof Product: gcc Version: 8.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: toe-ger at web dot de Target Milestone: --- *Minimal example*: template <class T> struct S{ S(T){} }; static_assert(sizeof(S{0})); *Expected output*: *Actual output*: <source>:5:22: error: missing template arguments after 'S' static_assert(sizeof(S{0})); ^ <source>:2:8: note: 'template<class T> struct S' declared here struct S{ ^ *Reproduction*: https://godbolt.org/z/9XLvfT (currently also fails on trunk) Note: Deduction guides are a C++17 feature and requires -std=c++17. S s{0}; compiles.