Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LWG-4113 Disallow has_unique_object_representations<Incomplete[]> #5124

Open
3 tasks
StephanTLavavej opened this issue Nov 24, 2024 · 2 comments
Open
3 tasks
Labels
compiler Compiler work involved LWG Library Working Group issue

Comments

@StephanTLavavej
Copy link
Member

LWG-4113 Disallow has_unique_object_representations<Incomplete[]>

We need to report this to:

  • C1XX
  • Clang
  • EDG

so they can reject this code:

C:\Temp>type meow.cpp
#include <print>
#include <type_traits>
using namespace std;

struct Incomplete;

int main() {
    println("{}", has_unique_object_representations_v<Incomplete[]>);
}
C:\Temp>cl /EHsc /nologo /W4 /std:c++latest /MTd /Od meow.cpp && meow
meow.cpp
false

C:\Temp>clang-cl /EHsc /nologo /W4 /std:c++latest /MTd /Od meow.cpp && meow
false

C:\Temp>cl /EHsc /nologo /W4 /std:c++latest /MTd /Od /c /BE meow.cpp
meow.cpp

C:\Temp>
@StephanTLavavej StephanTLavavej added compiler Compiler work involved LWG Library Working Group issue labels Nov 24, 2024
@github-project-automation github-project-automation bot moved this to Available in STL LWG Issues Nov 24, 2024
@AlexGuteniev
Copy link
Contributor

Do you not want library workaround until compilers have it?

@CaseyCarter
Copy link
Contributor

CaseyCarter commented Nov 24, 2024

Do you not want library workaround until compilers have it?

It's probably not worth our trouble to devise, implement, and review a workaround for such a weird corner case. I could be convinced otherwise if someone could exhibit a problem in an actual program caused by this issue, but for now I think we should focus on other priorities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Compiler work involved LWG Library Working Group issue
Projects
Status: Available
Development

No branches or pull requests

3 participants