Boost logo

Boost :

From: Ned Holbrook (ned_at_[hidden])
Date: 2001-02-06 19:50:30


Hello all,

I'm using the 21 Jan 01 version of cast.hpp and can't seem to get it
working with MSVC++ 6.0 SP4. cast.hpp compiles just fine, but I can't
actually use numeric_cast without receiving an error that looks like
this:

        error C2275: 'UInt16' : illegal use of this type as an expression

UInt16 is typedef'ed as unsigned short, and the line that gives this
error looks like this:

        UInt16 value = numeric_cast<UInt16>(MyUnsignedLongValue);

I'm strictly a CodeWarrior user, but I want to be able to use this
construct on Windows as well. Unfortunately, I know nothing about
MSVC++ and don't even know where to begin in tracking down this
problem.

If anyone wants to reply to me off-list, I'd be glad to post a
summary of any messages I receive. Thanks,

Ned Holbrook


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