Boost logo

Boost :

From: me22 (me22.ca_at_[hidden])
Date: 2006-06-29 11:10:45


On 6/28/06, Joaquín Mª López Muñoz <joaquin_at_[hidden]> wrote:
> During some conversations with a colleague I came up with a very
> sketchy realization of what could be converted, if there is interest,
> in a flyweight library. Please see flyweight.hpp at Vault/Patterns:
>
> Additionally, comparison of flyweight objects can be made faster than
> that of the underlying type T, since we it reduces to pointer comparison
>
Very nice!

A few comments:
- What's y?
  void swap(flyweight& x)

  {

          std::swap(x.h,y.h);

  }

- I'm not convinced operator< should be in terms of the pointer. x<y
being different from (T&)x < (T&)y seems like an easy source of
errors.

~ Scott McMurray

<OT> Has anyone proposed a good way of doing wrapping for C++0x? That
problem keeps coming up...


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