| Home | Libraries | People | FAQ | More

## Function template any_cast

boost::anys::any_cast

## Synopsis

    // In header: <boost/any/basic_any.hpp>

    template<typename ValueType, std::size_t OptimizeForSize,
             std::size_t OptimizeForAlignment>
      ValueType any_cast(basic_any< OptimizeForSize, OptimizeForAlignment > && operand);

## Description

Returns: | `ValueType` stored in `operand`, leaving the `operand` empty.
Throws: | boost::bad_any_cast if `operand` does not contain specified `ValueType`.