What could possibly work is what boost.pfr does to detect types of struct members (make a class with a templated
operator T
, try passing it to the constructor, use stateful metaprogramming to extract the type it got converted to). But this can get quite complicated.