Skip to content

Update the reflection syntax according to the latest draft #678

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

Merged
merged 1 commit into from
Aug 22, 2025

Conversation

robertoraggi
Copy link
Owner

@robertoraggi robertoraggi commented Aug 22, 2025

Add basic semantics for the splicers, enough for

constexpr std::meta::info int_ty = ^^int;
static_assert(__is_same(decltype(int_ty), const std::meta::info));

constexpr std::meta::info ptr_ty = ^^const void*;
static_assert(__is_same(decltype(ptr_ty), const std::meta::info));

constexpr std::meta::info z = ^^123;
static_assert(__is_same(decltype(z), const std::meta::info));

constexpr int x = [:z:];
static_assert(x == 123);

constexpr[:int_ty:] i = 123;
static_assert(__is_same(decltype(i), const int));

static_assert(i == 123);

constexpr[:ptr_ty:] ptr = nullptr;
static_assert(__is_same(decltype(ptr), const void* const));

@robertoraggi robertoraggi merged commit d55c77e into main Aug 22, 2025
9 checks passed
@robertoraggi robertoraggi deleted the free-dog branch August 22, 2025 21:40
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