Boost logo

Boost :

From: Petr Kocmid (pkocmid_at_[hidden])
Date: 2000-11-07 22:05:05


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

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

Shouldn't void handle_exception() be a static void py::handle_exception(),
just to prevent temptation to use it?

Yet another issue: With BOOST_NO_LIMITS, it reveals signed/unsigned
mismatches:

E:\boost\development\py_cpp\py.cpp(128) : warning C4018: '!=' :
signed/unsigned mismatch
        E:\boost\development\py_cpp\py.cpp(146) : see reference to function
template instantiation 'struct _object *__cdecl
py::integer_to_python(unsigned int)' being compiled
E:\boost\development\py_cpp\py.cpp(97) : warning C4018: '==' :
signed/unsigned mismatch
        E:\boost\development\py_cpp\py.cpp(151) : see reference to function
template instantiation 'unsigned int __cdecl py::integer_from_python(struct
_object *,struct py::Type<unsigned int>)' being compiled
E:\boost\development\py_cpp\py.cpp(128) : warning C4018: '!=' :
signed/unsigned mismatch
        E:\boost\development\py_cpp\py.cpp(196) : see reference to function
template instantiation 'struct _object *__cdecl
py::integer_to_python(unsigned long)' being compiled
E:\boost\development\py_cpp\py.cpp(97) : warning C4018: '==' :
signed/unsigned mismatch
        E:\boost\development\py_cpp\py.cpp(201) : see reference to function
template instantiation 'unsigned long __cdecl py::integer_from_python(struct
_object *,struct py::Type<unsigned long>)' being compiled

Again, those warnings arise only with STLport, not with native headers.

And just a remainder:
An excercise above was performed on MSVC6.4/STLport4.1b3/Py2.0c1

Petr Kocmid,
pkocmid_at_[hidden]


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