Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-04-23 12:39:00


1. Why can't I find a regular html version of the any docs in my CVS
checkout somewhere? Is this the effect of the new doc system? Not
too happy about that!

2. Consider:

    template<typename ValueType> ValueType any_cast(const any & operand);
    template<typename ValueType> const ValueType * any_cast(const any * operand);
    template<typename ValueType> ValueType * any_cast(any * operand);

    Description

    Returns: If passed a pointer, it returns a similarly qualified pointer
    to the value content if successful, otherwise null is returned. If
    passed a value or reference, it returns a copy of the value content if
    successful.

  When this says "passed", does it mean as an explicit template
  argument or as a function argument?

  I surmise it's the former, but IMO it badly needs to be clarified.

  If it's the former, the doc is inconsistent with the signature.

  Clearly

      any_cast<X&>(y);

  cannot return a copy of the value content, since it returns an X&.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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