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:24:9: warning: definition of implicit copy assignment operator for 'my_vertices' is deprecated because it has a user-provided copy constructor [-Wdeprecated-copy-with-user-provided-copy]
24 | public: my_vertices(my_vertices const& that);
| ^
main.cpp2:10:54: note: in implicit copy assignment operator for 'my_vertices' first required here
10 | vertices = my_vertices(0);
| ^
1 warning generated.
The same is true for the types in reflect.h2.
Those use @polymorphic_base @copyable.
They have a copy constructor, but not copy assignment or move operations.
For compiler_services in particular, which has no this member,
I suspect this is caused by the virtual destructor.
Title:
@copyable
withthis
member isn'tstd::copyable
.Description:
@copyable
is documented ascppfront/source/reflect.h2
Line 704 in 083c8a0
But it's implemented as
cppfront/source/reflect.h2
Line 723 in 083c8a0
So when
t
has athis
member,only a copy constructor is generated.
Minimal reproducer (https://cpp2.godbolt.org/z/xnoEzc6GE):
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: An ill-formed program, or
my_vertices
to modelstd::copyable
.Actual result and error:
Cpp2 lowered to Cpp1:
See also:
@metaclass
prevents type inheriting #453 (comment).The text was updated successfully, but these errors were encountered: