
15 Jan
2005
15 Jan
'05
7:03 a.m.
The code in: http://boost-sandbox.sourceforge.net/vault/inherit_linearly_test.cpp provides easy access to the elements of inherit_linearly with: get_tail<inherit_linearly<...>, i>::head_type which returns the i-th element in the inheritance heirarchy. Couldn't this be used to generate member names using templates? For example, the "name" of the i-th value on p. 191 of the _C++ Template Metaprogramming_ book would be: r.get_tail<inherit_linearly<...>, i>::head_type::value where r is an instance of: inherit_linearly<types, inherit_head_tail<wrap<_2>,_1> >::type