Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 2000-11-03 13:27:02


on 11/3/00 10:10 AM, Dan Nuffer at dnuffer_at_[hidden] wrote:

> Also, I am using gcc 2.95.2 on Caldera OpenLinux 2.4 and any_cast wouldn't
> compile. gcc was giving the following warning:
>
> src/tokenizer/any.hpp:179: parse error before `>'
>
> It didn't like the to_ptr<ValueType> for some strange reason. It
> normally accepts this syntax...
> To get around the problem I had to add a little template helper:
>
> template <typename ValueType>
> const ValueType * to_ptr_helper( ValueType* ) const
> {
> return const_cast<any *>(this)->to_ptr<ValueType>();
> }

If we use this workaround, I recommend adding the "inline" keyword to this
function template.

    -- Darin


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