|
Boost : |
From: Ed Brey (brey_at_[hidden])
Date: 1999-07-01 08:08:14
Email seemed somewhat boring, until David_Abrahams_at_[hidden] wrote:
>
>template <class T, class U = T>
>class divideable
>{
> friend T operator-( T x, const U& y ) { return x /= y; }
>};
>
>template <class T, class U = T>
>class modable
>{
> friend T operator-( T x, const U& y ) { return x %= y; }
>};
I'm assuming just a cut-and-paste typo, but the about two functions
should not be operator-.
It would be convenient to add a class that pulls in all the -able classes,
so that a class for which none of these pose a problem (probably most
classes) doesn't need to specify each one separately.
------------------------------------------------------------------------
eGroups.com home: http://www.egroups.com/group/boost
http://www.egroups.com - Simplifying group communications
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk