Comment on Compile-time JSON deserialization in C++parentComments−dctwinOP2yOh I think I finally groked what you suggested! Something liketemplate <StringLiteral str> static constexpr Key<str> keyin the class namespace - I think this this would work, but if I understand this correctly, You would need to do likeUser user {...}; user[User::key<"myKey">]Which actually is not so bad...
Comments
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...