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
The following code reports inconsistent results for __has_unique_object_representations:
template <int>
classFoo {
int x;
};
static_assert(__has_unique_object_representations(Foo<0>[]));
static_assert(__has_unique_object_representations(Foo<0>[][3]));
static_assert(__has_unique_object_representations(Foo<0>));
The key here is that if you assert __has_unique_object_representations(Foo<0>)first, then everything works. So somehow asking for __has_unique_object_representations(Foo<0>) must cause something to be instantiated or stored in the AST and that changes the result of a subsequent __has_unique_object_representations(Foo<0>[]) query (notice the array).