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
error: 'std::_Traits' has different definitions in different modules; first difference is defined here found data member '_S_copy_ctor' with an initializer static constexpr bool _S_copy_ctor = ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~note: but in 'a.<global>' found data member '_S_copy_ctor' with a different initializer static constexpr bool _S_copy_ctor = ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~error: 'std::variant::swap' from module 'a.<global>' is not present in definition of 'variant<_Types...>' provided earlier swap(variant& __rhs) ^note: declaration of 'swap' does not match
The confusing part is that the error is gone after we remove the seemingly meaningless foo.h.
The text was updated successfully, but these errors were encountered:
Oh, this is an invalid example. The operator && in module a is different from the operator && in module b due to the operator defined in foo.h. So the result of the ODR checking is correct but maybe it need to be more friendly.
Uh oh!
There was an error while loading. Please reload this page.
Reproducer:
The command line:
Then we will see:
The confusing part is that the error is gone after we remove the seemingly meaningless
foo.h
.The text was updated successfully, but these errors were encountered: