|
Boost : |
From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2001-10-30 09:48:42
----- Original Message -----
From: Daryle Walker <darylew_at_[hidden]>
To: Boost <boost_at_[hidden]>
Sent: Friday, October 26, 2001 10:47 PM
Subject: [boost] Quick look at improved_numeric_cast
> 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.
>
Done.
> 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>.)
>
Removed.
> 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.
>
Done.
> 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,
Thanks for all these comments!
I rearranged the code a little based on the line were the error ocurred,
after I guessed what could have been that MCW didn't like.
I hope this made it compile with more compilers than BC5.5.1
For now, I uploaded ONLY the archive "numeric_cast.zip"
Could you check this please?
I haven't applied the changes suggested by Darin Adler, yet, since those are
interface changes -but I agreed with him-
I'll wait for more feedback before I start with the syntatic/semantic
changes.
Thanks,
Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk