
07.06.2015 12:07, Roland Bock:
However, this is limited in the way that the type cannot be based on a literal outside a struct/class. There also is a macro that can be employed to create such types, e.g:
SQLPP_ALIAS_PROVIDER(hello);
By the way, I saw sqlpp11 earlier, and I think that alias/field provider
is a useful meta-programming tool on it's own.
https://github.com/rbock/sqlpp11/blob/master/include/sqlpp11/alias_provider....
For example it can be used in transformation of vector of structs into
structs of vectors - such macro would provide names for fields in
synthesized struct of references.
Perhaps it could be embedded by default into BOOST_FUSION_DEFINE_STRUCT
and others.
Also I think following template intrinsic can be useful addition to C++ ISO:
template