Boost Fusion: convert adapted struct type to text
Given a struct like this: struct Foo { int x; int y; double z; }; BOOST_FUSION_ADAPT_STRUCT(Foo, x, y, z); I want to generate a string like this: "{ int x; int y; double z; }" I have seen how to print the values of a Fusion adapted struct, but here I need to print the types and names only. How can I do this mostly simply? I'm not married to Boost.Fusion if there's a better way. llonesmiz I think you can get something similar to what you want by making some slight modifications on the code in this answer . You can easily get the member name using boost::fusion::extension::struct_member_name but