Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-01-04 08:37:17


"Michael D. Borghardt" <michael_at_[hidden]> writes:

> I kept looking into this and found this
>
> try
> {
> unsigned char u = 255;
> boost::numeric_cast<signed char>(u);
> std::cout << "OK" << std::endl;
> }
> catch (boost::bad_numeric_cast &ex)
> {
> std::cout << ex.what() << std::endl;
> }
>
> This does not throw an exception.

What is the representation range of a signed char on your platform?

-- 
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