|
Boost : |
From: Steven Watanabe (steven_at_[hidden])
Date: 2007-10-10 15:59:48
AMDG
Simonson, Lucanus J <lucanus.j.simonson <at> intel.com> writes:
> If it is just an issue of non-member, non-friend style being
> in favor now vs. classes with a rich set of member functions I don't
> think I would ever switch. I am quite clearly encapsulating the data in
> the data type and using the concept type to organize the set of
> behaviors the concept is providing for that data. Our use of the
> language should be based upon an understanding of the benefits and
> drawbacks of what we are doing, and not simply guided by a pseudo code
> algorithm from one of Scott's books.
My main issue is that you are relying on unspecified and/or undefined
behavior to accomplish this. One possible solution is to store a pointer
rather than a copy. This is problematic when you need a temporary though,
because you would need two types--one that stores a pointer and one that
can hold a value.
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk