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

Divergence between placeholder-type definition in the specification and .ifc produced by MSVC #13

Closed
AndreyG opened this issue Nov 1, 2021 · 3 comments · Fixed by #16

Comments

@AndreyG
Copy link
Contributor

AndreyG commented Nov 1, 2021

According to the definition of placeholder-type-structure (sec:ifc:TypeSort:Placeholder) its sizeof should be equal 8, but entry_size in the partition "type.placeholder" produced by MSVC (IFC-version 0.40) is equal to 12.

@cdacamar
Copy link
Collaborator

cdacamar commented Nov 1, 2021

There is an extra member in this structure known as the 'elaboration' (what the placeholder was deduced to). This elaboration field appears after basis and is a TypeIndex.

cc @GabrielDosReis

@AndreyG
Copy link
Contributor Author

AndreyG commented Nov 1, 2021

@cdacamar, thanks. Do I understand correctly, that elaboration could be null for dependent (1) or undeducible (2) type?

template<typename T>
/* #1 */ auto f() { return T::foo(); }

/* #2 */ auto g(); // #2

@cdacamar
Copy link
Collaborator

cdacamar commented Nov 1, 2021

In both cases the elaboration field would be null.

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

Successfully merging a pull request may close this issue.

2 participants