|
Boost : |
From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-10-02 18:41:50
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:
>>
>> http://lists.boost.org/Archives/boost/2005/10/94661.php
>
>
> 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?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk