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

feat: add _computed-type-id_ for qualified type_of and decltype #1301

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JohelEGP
Copy link
Contributor

@JohelEGP JohelEGP commented Oct 7, 2024

My next code which I couldn't update:

      magnitude2d: <Number> type ==
        decltype(_cartesian_magnitude2d(std::type_identity<std::tuple<Unit, Number>>()))::type;
      vector2d: <Number> type ==
        std::type_identity_t<decltype(_cartesian_vector2d(std::type_identity<std::tuple<Unit, Number>>()))>::type;

The Cpp1 syntax uses computed-type-specifier,
which I modeled with computed-type-id.
Supporting C++26's pack indexing (in type-ids) was a low-hanging fruit.

@JohelEGP JohelEGP changed the title feat: add _computed-type-id_ for qualified type_of and decltype feat: add _computed-type-id_ for qualified type_of and decltype Oct 7, 2024
@JohelEGP
Copy link
Contributor Author

JohelEGP commented Oct 7, 2024

Here's Clang compiling the pack indexing test,
after enabling the commented out test case and manually adding the typename:
https://cpp2.godbolt.org/z/avqqqGb6x.

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 this pull request may close these issues.

1 participant