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
main.cpp2:5:61: error: assigning to 'std::vector<int> *' from incompatible type 'std::vector<int>'; take the address with &
5 | view = v;
| ^
| &
main.cpp2:10:26: note: in instantiation of member function 'spanning_vector<int>::operator=' requested here
10 | view = vec2;
| ^
1 error generated.
Title: Postfix operators of member assignment ignored.
Minimal reproducer (https://cpp2.godbolt.org/z/b8EEa6jnf):
Commands:
cppfront main.cpp2 clang++18 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -I . main.cpp
Expected result:
view = _;
, or*view = v;
(for the assignment to Just Work [BUG] move-assignment operators defaulting to memberwise semantics makes it impossible to cleanup old value #475 (comment)).Actual result and error:
view = v;
Cpp2 lowered to Cpp1:
Output:
See also:
operator=
within this
(via function metafunction@proxy
) #452 (comment).The text was updated successfully, but these errors were encountered: