Comment

Comment by dctwin

Oh I think I finally groked what you suggested! Something like

template <StringLiteral str> static constexpr Key<str> key

in the class namespace - I think this this would work, but if I understand this correctly, You would need to do like

User user {...}; user[User::key<"myKey">]

Which actually is not so bad...

parent dctwin 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton