Boost logo

Boost :

From: Daryle Walker (darylew_at_[hidden])
Date: 2001-10-26 20:47:57


I'm looking at the archive at:

http://groups.yahoo.com/group/boost/files/improved_numeric_cast/numeric_cast
.zip

that I downloaded this afternoon.

It looks neat. Let's try to get it to compile....

1. You should try using forward slashes instead of back slashes to separate
directories in your #includes. DOS/Windows will take either one, but back
slashes risk getting escape sequences in the file names, which are illegal.

2. Since I'm not using your compiler, let alone your computer type, the
#include <windows.h> and #pragma hdrstop are useless to me. (The second one
got me a warning, the first wasn't noted since I have a totally different
<Windows.h>.)

3. Be careful of expressions like

    bool_to_type<::boost::is_integral<N>::value>::typed_value

Abutting a globally-referenced name next to an opening template bracket is a
bad idea because "<:" is a digraph (for "[")! Make sure to add spacing.
Remember, digraphs and trigraphs are technically _not_ optional, so some
compilers don't give an option to ignore them.

4. You may want to use BOOST_NESTED_TEMPLATE and other macros to help with
older compilers.

I can't continue. In "numeric_cast_traits_detail.hpp", my compiler is
expecting a comma after the BOOST_STATIC_CONSTANT of
boost::numeric_cast_traits_detail::subranged_int_to_int<T, S>::value. I
later get an internal error in the same file. Oh well, maybe this code is
too complex for my compiler (Metrowerks CodeWarrior Pro 5.3/Mac) to handle.

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com

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