Boost logo

Boost :

From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-01-27 12:55:48


Hi all,
equality semantic
bool b=(&(fw1.get())==&(fw2.get())); versus bool
b=((fw1.get())==(fw2.get())); Why not delegate this responsability to the
factory, the factory knows better when the two handles are equal, isn't it?

  friend bool operator==(const flyweight& x,const flyweight& y)
  {
    return core:are_equals(x.h==y.h);
  }

The factories provided by the library could define this are_equals function
as
     return (&x==&y); Regards---------------------------
Vicente Juan Botet Escriba


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