
On 10/02/2005 06:07 PM, Reece Dunn wrote:
Larry Evans wrote: [snip]
and this would lead to the readability problem which Jonathan repeated in:
True. Here, macros would be needed for something like:
BOOST_CREATE_TABLE( mytable, BOOST_TABLE_ROW( first_name, std::string ) ... ); Or, something like that shown in:
http://lists.boost.org/Archives/boost/2005/09/94418.php which contains: RM_DEFINE_ROW(xxx,((int,a_int))((float,a_float))); where the correspondence with the above BOOST_CREATE_TABLE(...) is: xxx mytable a_int first_name int std:string a_float ? float ?
but this would no longer be a tuple :(.
True. What are the advantages of a tuple that would outweigh the readability disadvantage mentioned by both Jonathan and Calum?
Unless you have something like:
struct people { typedef tuple< ... > table; static const int first_name = 0; };
then the macro definition breaks :(.
Sorry, I'm not following you. Why would you need something like the above 'struct people' when RM_DEFINE_ROW would suffice?