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
Cannot initialise container in the constructor under certain conditions.
To Reproduce
Consider this code:
foo: type = {
m: std::map<int, int>;
operator=: (out this, bar: int) = { m = ( std::pair(1, 2), std::pair(3, 4) ); }
}
main: () = {
f := foo(5);
}
I get this error using MSVC:
repro.cpp(7): error C2679: binary '=': no operator found which takes a right-hand operand of type 'std::pair<int,int>' (or there is no acceptable conversion)
If I remove the bar parameter then it works.
The text was updated successfully, but these errors were encountered:
Describe the bug
Cannot initialise container in the constructor under certain conditions.
To Reproduce
Consider this code:
I get this error using MSVC:
If I remove the
bar
parameter then it works.The text was updated successfully, but these errors were encountered: