Antony Polukhin
Hello,
I've come up with a trick that may be useful in Boost.Hana, Boost.Serialization or some other libraries.
Definitely an interesting and novel trick. Although, as you said, it is a nasty trick, and such things would be better if supported in the language (IMO). Until then, this trick might be useful.
[...] * there's no known to me way to make get<>() method constexpr
If we computed the offset at which the n-th member lies inside the struct,
couldn't we use something like
template
* does not detect constness (because of that get<>() always returns const reference)
Is there any interest in this feature?
That might be interesting for Hana, while we wait for a language feature to make this easier. Louis