Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-02-12 18:09:26


On 02/09/2005 11:52 AM, Arkadiy Vertleyb wrote:
[snip]
>
> You can download it from:
>
> http://groups.yahoo.com/group/boost/files/tables.zip
>
> It has some documentation that explains usage. If you have any additional
> questions or comments, they are welcome.

I've been looking at tables/doc/rtl.htm#_Toc68859940 and noted:

   Note that one can easily define two columns of the same type. In this
   case, ssn and salary are two distinct classes that both denote a
   column of type int. Having two columns with same name is prohibited.

This requirement of unique column "names" (by which you mean column
class, as indicated by a previous paragraph in rtl.htm) avoids the
problem of duplicate types cited here:

https://sourceforge.net/tracker/index.php?func=detail&aid=544055&group_id=29557&atid=396644

Is that right? IOW, you could use inherit_linearly for even non-class
types by simple wrapping them in a uniquely named class. So, for
example, you could use:

   template<typename Fields>
   struct row : inherit_linearly<Fields,inherit>{};

Is there some reason you don't?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk