
"Simonson, Lucanus J" <lucanus.j.simonson@intel.com> wrote in message news:33E1C72C74DBE747B7B59C1740F7443703592F5F@orsmsx417.amr.corp.intel.com... [...]
Perhaps we can figure out how to overcome the compile error that caused you to add the cast, or figure out something you can cast the pointer to that will portably result in no loss of data, such as perhaps size_t.
Agreed. The int cast is a quick fix to make everything work; there is no intent of keeping it the way it is ;) Here is the following sample compiled using GCC for Windows: #include <list> #include <boost/numeric/interval.hpp> using namespace std; using namespace boost::numeric; int main() { list< interval<void *> > seg; seg.push_back(interval<void *>((void *)(10), (void *)(11))); } Y:/UNIX/local/bin/../lib/gcc/mingw32/3.4.5/../../../../include/boost/numeric/interval/checking.hpp: In static member function `static T boost::numeric::interval_lib::checking_base<T>::empty_lower() [with T = void*]': Y:/UNIX/local/bin/../lib/gcc/mingw32/3.4.5/../../../../include/boost/numeric/interval/checking.hpp:88: instantiated from `static T boost::numeric::interval_lib::checking_no_empty<T, Checking, Exception>::empty_lower() [with T = void*, Checking = boost::numeric::interval_lib::checking_base<void*>, Exception = boost::numeric::interval_lib::exception_create_empty]' Y:/UNIX/local/bin/../lib/gcc/mingw32/3.4.5/../../../../include/boost/numeric/interval/interval.hpp:269: instantiated from `void boost::numeric::interval<T, Policies>::set_empty() [with T = void*, Policies = boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<void*>, boost::numeric::interval_lib::checking_strict<void*> >]' Y:/UNIX/local/bin/../lib/gcc/mingw32/3.4.5/../../../../include/boost/numeric/interval/interval.hpp:171: instantiated from `boost::numeric::interval<T, Policies>::interval(const T&, const T&) [with T = void*, Policies = boost::numeric::interval_lib::policies<boost::numeric::interval_lib::rounded_math<void*>, boost::numeric::interval_lib::checking_strict<void*> >]' interval2.cpp:11: instantiated from here Y:/UNIX/local/bin/../lib/gcc/mingw32/3.4.5/../../../../include/boost/numeric/interval/checking.hpp:62: error: invalid static_cast from type `int' to type `void*' -Phil