FieldOwned<T>::operator T() is defined on the primary template but per-type explicit specializations drop it. Types that have a specialization lose the conversion operator.
Built-in primitives like int32_t work because they have no specialization. Bool doesn't work.
My (naive?) proposal would be a CRTP mixin that provides operator T() for all field kinds and primary templates / specializations should inherit from it. If you are OK with this, I can contribute it.
FieldOwned<T>::operator T()is defined on the primary template but per-type explicit specializations drop it. Types that have a specialization lose the conversion operator.Built-in primitives like
int32_twork because they have no specialization.Booldoesn't work.My (naive?) proposal would be a CRTP mixin that provides
operator T()for all field kinds and primary templates / specializations should inherit from it. If you are OK with this, I can contribute it.