Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-02-20 07:08:41


From: "Peter Dimov" <pdimov_at_[hidden]>
> template<class T> struct construct
> {
> typedef T result_type;
> result_type operator()() const { return T(); }
> template<class A1> result_type operator()(A1 a1) const { return
T(a1); }

  template<class A1> result_type operator()(A1 & a1) const { return T(a1); }

> // impl-def number of additional overloads ;-)
> };
>
> bind(&construct<Foo>, _1);

  bind(construct<Foo>(), _1);


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