Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2004-09-22 12:03:06


Aleksey Gurtovoy writes:
> David Abrahams writes:
> > The introduction of mpl::numeric_cast has caused a regression in
> > libs\python\test\vector_indexing_suite.cpp for vc6. How shall we
> > resolve this problem?
>
> Resolved in the CVS:
>
[...]

> ... only to find that it was masking an ICE. I'll have to look at it
> later today.

Tracked down and fixed now:

===================================================================
RCS file: /cvsroot/boost/boost/boost/python/suite/indexing/detail/indexing_suite_detail.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- indexing_suite_detail.hpp 20 Sep 2004 13:39:37 -0000 1.12
+++ indexing_suite_detail.hpp 22 Sep 2004 16:54:04 -0000 1.13
@@ -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 @@
                     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 @@
                     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
             }
         }

Our regression machine is in the middle of the cycle, though, so the results
will get into the reports only in ~20 hours.
    

--
Aleksey Gurtovoy
MetaCommunications Engineering

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