Add user-defined literal to create a nametag provider from a string literal#107
Add user-defined literal to create a nametag provider from a string literal#107vaijns wants to merge 1 commit intorbock:mainfrom
Conversation
…iteral, usable as normal parameter to .as(<NameTagProvider>)
|
That's super interesting! Can you provide the link to the paper you found the idea in? |
I actually can't as I was wrong with that memory, it wasn't in a paper where I saw it. It was another project on github. Here I found the However, there are papers with similar concepts, though I didn't know about some of them before.
Though instead of a more generic type like |
Didn't realize this was possible just until I recently saw something similar done in a C++ standard paper. This would allow the reflection aliases to not use the template parameter overload but just pass the result of a user-defined literal as a normal parameter (because it creates a NameTagProvider directly). You can see an example in the tests or in the docs.
I don't have any preference, I'm fine with template parameters and just thought it's interesting. So only merge it if you'd prefer to have it, I'd be totally okay with the PR just being closed.