Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-01-30 12:53:24


on 1/30/00 10:55 AM, Aleksey Gurtovoy at alexy_at_[hidden] wrote:

> I think the whole thing is quite smooth now. Probably the only things
> we don't have yet are a template constructor from arbitrary type and
> a template conversion function to such a type (which are intended to
> perform conversions between our and platform-dependent geometry
> classes), e.g.
>
> template<class T1, class T2>
> class rectangle {
> // ...
> template<class U>
> rectangle( call_traits<U>::param_type u ) { assert( 0 ); }
>
> template<class U>
> operator U() { assert( 0 ); }
> // ...
> };
>
> and there must be a specialization of these members in a
> platform-specific header...

These lightweight classes are cheap to return by value, so I think free
functions boost::make_rectangle<T>(...) and boost::make_point<T>(...) would
be a better choice. We can allow users (or platforms) to overload these in
namespace boost.


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