2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-22 17:32:55 +00:00

fix MSVC 6.x ICE in 'vector_indexing_suite.cpp'

[SVN r25343]
This commit is contained in:
Aleksey Gurtovoy
2004-09-22 16:54:04 +00:00
parent 2121039a2b
commit 3bb3434a8d

View File

@@ -11,6 +11,8 @@
# include <boost/get_pointer.hpp>
# include <boost/detail/binary_search.hpp>
# include <boost/numeric/conversion/cast.hpp>
# include <boost/detail/workaround.hpp>
# include <boost/config.hpp>
# include <vector>
# include <map>
#include <iostream>
@@ -590,7 +592,15 @@ namespace boost { namespace python { namespace detail {
from = 0;
if (from > max_index) // Clip upper bounds to max_index.
from = max_index;
// agurt 21/sep/04: here and below -- MSVC 6.x ICEs in 'vector_indexing_suite.cpp'
// unless we get skip 'boost::numeric_cast' layer and directly invoke the
// underlaying convertor's method
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
from_ = boost::numeric_cast<Index>(from);
#else
from_ = boost::numeric::converter<Index,long>::convert(from);
#endif
}
if (Py_None == slice->stop) {
@@ -604,7 +614,12 @@ namespace boost { namespace python { namespace detail {
to = 0;
if (to > max_index)
to = max_index;
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
to_ = boost::numeric_cast<Index>(to);
#else
to_ = boost::numeric::converter<Index,long>::convert(to);
#endif
}
}