Boost logo

Boost :

From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2008-08-06 05:28:29


Posting to devel, since I believe sucking ADL may be the cause ...
I have a headache problem with VC8/SP1 which leads to some questions.

1. Can you confirm this behaviour?
2. Do you have a quick fix workaround for this?
3. Can this be fixed in future versions of boost

The following innocent looking piece of code (boiled down within 2 days -sigh)

#include <boost/numeric/interval.hpp>
#include <boost/numeric/ublas/traits.hpp>

#include <boost/numeric/ublas/vector.hpp>

namespace ublas = boost::numeric::ublas;

void trigger_ublas_compile_error()
        ublas::vector<double> boom = ublas::zero_vector<double>(5);

compiled with VC8 SP1 in DEBUG mode with a command line similar to
(some private include paths ripped off)

/Od /I "PATH_TO\boost_1_36_beta" /D "WIN32" /D "_WINDOWS" /D "_DEBUG"
/Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /ZI /TP
/errorReport:prompt /bigobj

bails out with

------ Build started: Project: XXXX, Configuration: Debug Win32 ------
[...]\boost_1_36_beta\boost\numeric\ublas\traits.hpp(97) : error C2784:
'boost::numeric::interval<T,Policies> boost::numeric::sqrt
(const boost::numeric::interval<T,Policies> &)' :
could not deduce template argument for
'const boost::numeric::interval<T,Policies> &' from 'const double'
        [...]\boost_1_36_beta\boost\numeric\interval\arith2.hpp(198) :
see declaration of 'boost::numeric::sqrt'
        [...]\boost_1_36_beta\boost\numeric\ublas\traits.hpp(93) :
while compiling class template member function
'double boost::numeric::ublas::scalar_traits<T>::type_sqrt(const double &)'
        [...]\boost_1_36_beta\boost\numeric\ublas\traits.hpp(151) :
see reference to class template instantiation
'boost::numeric::ublas::scalar_traits<T>' being compiled
[...]\boost_1_36_beta\boost\numeric\ublas\traits.hpp(97) :
fatal error C1903: unable to recover from previous error(s);
stopping compilation
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Ugly as it is: it will compile in any release mode, be it static or dynamic
linkage :-(

Boost list run by bdawes at, gregod at, cpdaniel at, john at