You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expressions with parentheses inside template arguments break parsing #2327
The <argument_list> closes after int,. The second template argument (sizeof(int)) becomes raw text inside <class_decl>, and > {}; becomes a separate <expr_stmt>.
Same issue with all *_cast<>() expressions:
class Foo : public std::array<int, static_cast<size_t>(4)> {}; // broken
class Foo : public std::array<int, (size_t)4> {}; // OK
class Foo : public std::array<int, 4> {}; // OK
changed the title [-]C++ template argument with static_cast breaks class parsing[/-][+]Expressions with parentheses inside template arguments break parsing[/+]on Mar 20, 2026
Activity
[-]C++ template argument with static_cast breaks class parsing[/-][+]Expressions with parentheses inside template arguments break parsing[/+]