-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Hi!
Currently, it's quite easy to produce identifiers from meta::string_types with unqualid but much more difficult (or even impossible) the other way around.
For instance:
consteval {
for (int i = 0; i < 10; ++i) {
-> fragment namespace {
void unqualid("func_", %{i})() {}
namespace unqualid("ns_", %{i}) {}
};
}
}Is easy enough but programmatically retrieving these functions/namespace just to print them,
much harder:
consteval {
for (int i = 0; i < 10; ++i) {
-> fragment namespace {
consteval {
// reflexpr(unqualid("func_", %{i})); //doesn't work
// namespace s = unqualid("ns_", %{i}); //ICE if uncommented
}
};
}
}Ideally it would be nice if we could just have a meta::reflstr, when we just want the lookup but not the reification:
consteval {
for (int i =0; i < 10; ++i) {
meta::info fn = meta::reflstr("func_", i);
meta::info ns = meta::reflstr("ns_", i);
meta::compiler.print(fn);
meta::compiler.print(ns);
}
}Is that possible to implement or are there some hard limitations preventing its implementation?
Thanks in advance
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels