|
Boost : |
From: David Abrahams (abrahams_at_[hidden])
Date: 2000-11-07 22:23:05
----- Original Message -----
From: "Petr Kocmid" <pkocmid_at_[hidden]>
> > From: David Abrahams [mailto:abrahams_at_[hidden]]
> > On second look at the conditional, it looks like a brain-o. Clearly if
> > __STL_MSVC is not defined, it is <= 1200. I think the author meant this:
> >
> > # if !(defined(__STL_MSVC) || (__STL_MSVC <= 1200))
>
> Interesting theory, but sp4 _is_ 1200, so if __STL_MSVC is
> defined, it is also <=1200. Why should he ask at all?
I guess you missed my previous message; I have long ago retracted the above
stupidity.
> Well, STLport 4.1b3 now landing here, wait a second...
> Wow! Looking the header, condition is totally commented out, just as I
did.
>
> Let's try it...
> Hmm, some warnings about LONGLONG_MAX, but no danger nor relevant to
> boost...
> ...Oh, that hurts, finally.
>
> py.cpp
> E:\boost\boost/cast.hpp(164) : fatal error C1001: INTERNAL COMPILER ERROR
> (compiler file 'msc1.cpp', line 1794)
> Please choose the Technical Support command on the Visual C++
>
> ------------------------------------- cast.hpp (159-166)
> // Move to namespace boost in utility.hpp?
> template <class T>
> struct fixed_numeric_limits
> : public numeric_min_select<
> std::numeric_limits<T>::is_signed
> >::template limits<T>
> {
> };
> -----------------------------------------------------------------
> Again, without STLport it compiles fine, so problem is with probably
> with STLport interfering with boost.
>
> Well, I am going to hack py.cpp to BOOST_NO_LIMITS for myself
That's the wrong fix. I think you need to make the following change in
boost/cast.hpp:
// Move to config.hpp?
-#if defined(__SGI_STL_PORT) && __SGI_STL_PORT <= 0x400 &&
__STL_STATIC_CONST_INIT_BUG
+#if defined(__SGI_STL_PORT) && __SGI_STL_PORT <= 0x410 &&
__STL_STATIC_CONST_INIT_BUG
// STLPort 4.0 doesn't define the static constants in numeric_limits<> so
that they
// can be used at compile time if the compiler bug indicated by
Boris had previously promised to change <limits> for the next release so
that things like is_signed could be used as compile-time constants with
MSVC, but apparently that hasn't been done (yet).
>, but
> question arises: What's the benefit of having boost::numeric_cast<>
> at all inside py.cpp, not counting the joy of maintaining twice the
> same thing?
What on earth are you talking about? I haven't copied the source of
boost::numeric_cast<>!?!
> Shouldn't void handle_exception() be a static void py::handle_exception(),
> just to prevent temptation to use it?
No; it's needed by every user program that uses py_cpp. Every single example
in the documentation uses it.
> Yet another issue: With BOOST_NO_LIMITS, it reveals signed/unsigned
> mismatches:
See the fix above.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk