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
If I declare a struct, and then use it as the result of an inspect, cppfront generates code constructing the struct with no arguments -- and there's no way to declare an operator= with no arguments in a struct!
Obviously action{} is a zero-parameter constructor, and action doesn't have any zero-argument constructors. (And even if I ensure that action{} is on a code path never taken, both gcc 14 and Clang 19 try to compile it and throw an error.)
The text was updated successfully, but these errors were encountered:
If I declare a struct, and then use it as the result of an inspect, cppfront generates code constructing the struct with no arguments -- and there's no way to declare an operator= with no arguments in a struct!
Steps to reproduce the behavior:
https://cpp2.godbolt.org/z/K6f9h9qjx
cppfront generates this as the definition of action:
and this as the definition of testfn:
Obviously
action{}
is a zero-parameter constructor, and action doesn't have any zero-argument constructors. (And even if I ensure thataction{}
is on a code path never taken, both gcc 14 and Clang 19 try to compile it and throw an error.)The text was updated successfully, but these errors were encountered: