Boost logo

Boost :

From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2000-11-09 12:53:30


I have one more suggestion, and that is to either change the name of to_ptr
or add an additional member function "thing()"

Reasoning:
  It would make the code look cool.

  any Any;
  any No;

  Any = 5;

  if (Any.thing() == No.thing() )
  {
    ....
  }

  if (!Any.thing() )
  {
    ....
  }

  I considered renaming "empty()" but having to_ptr allows

  any This;
  any That;
  any Some;

  This = *Any.thing();

  That = *This.thing();

  if (!That.thing() )
     That = *Any.thing();
  else
      That = *Some.thing();

I suppose if thing() did the to_ref() you could eliminate the extra
operator*();

  Yours, (Having fun with the English language and "any" )
 -gary-

gary.powell_at_[hidden]


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