
Larry Evans wrote:
On 10/02/2005 04:53 PM, Reece Dunn wrote: [snip]
The RML database and results could be kept in tuples, so CREATE TABLE would be:
typedef boost::tuple< std::string, std::string, int > people_table; static const int first_name = 0; ...
But, as Calum pointed out in:
http://lists.boost.org/Archives/boost/2005/09/94348.php
I.e. the "first_name" column may be 2 for customers, and 3 for products. Hence, this would have to be qualified with the table or record name, e.g.
customers::first_name products::first_name
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 ) ... ); but this would no longer be a tuple :(. Unless you have something like: struct people { typedef tuple< ... > table; static const int first_name = 0; }; then the macro definition breaks :(. - Reece