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
I have expected that copy elision also enables reflecting aggregates that are neither copyable nor movable.
Clang and GCC both successfully reflect such types, however MSVC fails to do so.
As shown in the example, the aggregate can be returned from functions just fine through mandatory copy elision, and it is also classified as an aggregate and can be aggregate initialized as expected.
However MSVC fails, asking me to report the issue, so here it is.
The text was updated successfully, but these errors were encountered:
A workaround for this is to declare the move constructor of your type private and not implement it.
The existence of the signature, or rather it not being explicitly deleted, is enough to make Boost.PFR work again.
MSVC implements mandatory copy elision in v16.29.
I have expected that copy elision also enables reflecting aggregates that are neither copyable nor movable.
Clang and GCC both successfully reflect such types, however MSVC fails to do so.
Minimal example to reproduce the issue: godbolt
As shown in the example, the aggregate can be returned from functions just fine through mandatory copy elision, and it is also classified as an aggregate and can be aggregate initialized as expected.
However MSVC fails, asking me to report the issue, so here it is.
The text was updated successfully, but these errors were encountered: