From: Thomas Klimpel (Thomas.Klimpel_at_[hidden])
Date: 2008-08-07 14:33:01
> 1. Can you confirm this behaviour?
I can confirm this (VC8, debug).
> 2. Do you have a quick fix workaround for this?
How about "#define NDEBUG" :-)
I'm no expert on ADL, so I have no idea whether VC8 is allowed to fail
here. VC8 seems to fail as soon as I define any template function named
sqrt inside the boost or boost::numeric namespace. I have no idea how to
work around that. Perhaps I should investigate why "#define NDEBUG"
works around the problem.
> 3. Can this be fixed in future versions of boost
I don't even know what causes the problem in the first place. Moving
numeric/interval to a separate namespace would probably avoid the
current problem, but this is not what I would call "fixed".
I think you should report the problem to the ublas mailing list, where
you initially also reported your "non-boiled down" problem.
[mailto:boost-bounces_at_[hidden]] On Behalf Of Markus Werle
Sent: Mittwoch, 6. August 2008 11:28
Subject: [boost] [1.36][ublas] VC8/SP1 with ADL problem?
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
namespace ublas = boost::numeric::ublas;
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"
/D "_CRT_SECURE_NO_WARNINGS" /D "_SCL_SECURE_NO_WARNINGS"
/D "BOOST_PYTHON_STATIC_LIB" /D "_MBCS" /Gm /EHsc /RTC1 /MTd
/Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /ZI /TP
bails out with
------ Build started: Project: XXXX, Configuration: Debug Win32 ------
[...]\boost_1_36_beta\boost\numeric\ublas\traits.hpp(97) : error C2784:
(const boost::numeric::interval<T,Policies> &)' :
could not deduce template argument for
'const boost::numeric::interval<T,Policies> &' from 'const double'
see declaration of 'boost::numeric::sqrt'
while compiling class template member function
'double boost::numeric::ublas::scalar_traits<T>::type_sqrt(const double
see reference to class template instantiation
'boost::numeric::ublas::scalar_traits<T>' being compiled
fatal error C1903: unable to recover from previous error(s);
========== 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
Unsubscribe & other changes: