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

class layout for [[no_unique_address]] #49

Closed
zygoloid opened this issue Mar 17, 2018 · 1 comment
Closed

class layout for [[no_unique_address]] #49

zygoloid opened this issue Mar 17, 2018 · 1 comment

Comments

@zygoloid
Copy link
Contributor

C++20 adds a [[no_unique_address]] attribute, which allows EBO layout to be requested for non-static data members. We need to update the ABI document to describe how it affects class layout.

As a concrete goal, we should aim to ensure that these two classes are laid out the same:

struct A : T1, T2, ... { ... };
struct A { [[no_unique_address]] T1 t1; [[no_unique_address]] T2 t2; ... };

... in all cases where that is possible. (There are cases where it is not: for example, if A has a primary base class other than T1 and any prior base class is non-empty.)

zygoloid added a commit to zygoloid/cxx-abi that referenced this issue Mar 17, 2018
@zygoloid
Copy link
Contributor Author

zygoloid added a commit to zygoloid/cxx-abi that referenced this issue Apr 6, 2018
zygoloid added a commit to zygoloid/cxx-abi that referenced this issue Apr 6, 2018
zygoloid added a commit to zygoloid/cxx-abi that referenced this issue Apr 6, 2018
zygoloid added a commit to zygoloid/cxx-abi that referenced this issue Apr 7, 2018
zygoloid added a commit to zygoloid/cxx-abi that referenced this issue Apr 7, 2018
zygoloid added a commit to zygoloid/cxx-abi that referenced this issue Apr 7, 2018
zygoloid added a commit to zygoloid/cxx-abi that referenced this issue Apr 7, 2018
zygoloid added a commit to zygoloid/cxx-abi that referenced this issue Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant