|
Boost : |
From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-05-03 23:51:49
>From: "Justin M. Lewis" <boost_at_[hidden]>
> Yes, now imagine we live in a world where there are non-copyable objects
> that you sometimes pass to functions, and tell me how you handle that case
> with return values.
There may be ways to design an API to avoid this.
For example:
noncopyable object;
object.f(); // No copy needed, to operate on the object.
>Or, how about polymorphic types, where you can't simply create the object
>internally in the function, where you HAVE to deal with what's passed in in
>one way or another.
object_ptr->f();
Regards,
Terje
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk