File tree Expand file tree Collapse file tree 1 file changed +4
-19
lines changed
include/boost/python/suite/indexing/detail Expand file tree Collapse file tree 1 file changed +4
-19
lines changed Original file line number Diff line number Diff line change 1111# include < boost/get_pointer.hpp>
1212# include < boost/detail/binary_search.hpp>
1313# include < boost/numeric/conversion/cast.hpp>
14- # include < boost/detail/workaround.hpp>
15- # include < boost/config.hpp>
1614# include < vector>
1715# include < map>
1816#include < iostream>
@@ -590,17 +588,9 @@ namespace boost { namespace python { namespace detail {
590588 from += max_index;
591589 if (from < 0 ) // Clip lower bounds to zero
592590 from = 0 ;
593- if (from > max_index) // Clip upper bounds to max_index.
594- from = max_index;
595-
596- // agurt 21/sep/04: here and below -- MSVC 6.x ICEs in 'vector_indexing_suite.cpp'
597- // unless we get skip 'boost::numeric_cast' layer and directly invoke the
598- // underlaying convertor's method
599- #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
600591 from_ = boost::numeric_cast<Index>(from);
601- #else
602- from_ = boost::numeric::converter<Index,long >::convert (from);
603- #endif
592+ if (from_ > max_index) // Clip upper bounds to max_index.
593+ from_ = max_index;
604594 }
605595
606596 if (Py_None == slice->stop ) {
@@ -612,14 +602,9 @@ namespace boost { namespace python { namespace detail {
612602 to += max_index;
613603 if (to < 0 )
614604 to = 0 ;
615- if (to > max_index)
616- to = max_index;
617-
618- #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
619605 to_ = boost::numeric_cast<Index>(to);
620- #else
621- to_ = boost::numeric::converter<Index,long >::convert (to);
622- #endif
606+ if (to_ > max_index)
607+ to_ = max_index;
623608 }
624609 }
625610
You can’t perform that action at this time.
0 commit comments