Boost logo

Ublas :

From: Martin Wirth (martin_wirth_at_[hidden])
Date: 2008-03-15 16:35:07


Chris Bevan <chris <at> thefoundry.co.uk> writes:
> Have a look at this example programme:
> #include <boost/numeric/ublas/vector.hpp>
>
> typedef boost::numeric::ublas::c_vector<int, 2> Vec;
>
> void VecFn(const Vec& a)
> {
> Vec b(a);
> }
> It produces the following error when compiled with the configuration
> mentioned above:
> boost/numeric/ublas/vector.hpp(1302): error: more than one instance
> of overloaded function "std::copy" matches the argument list:

Hi Chris,
i think this is an error of the dinkumware implementation, especially the
secure SCL part of it. It seems that the implementation of of the copy algorithm
in <xutility> (starting at line 2350) has problems deciding
which of the two available overloads (one for checked iterators, one
for unchecked) to choose. I suspect that the implementation of the
_IF_CHK macro which is supposed to turnoff the first alternative
(for checked iterators) does not work for the case of ublas::vector.

If you disable the secure SCL features (by adding _SECURE_SCL=0 to
your preprocessor directives) then only one copy() is available and the
thing compiles. I haven't tried to figure out any further details but
 i hope i 'm not too wrong on this one. i'm only on a medium experience
level when it comes to libraries.

Cheers and greetings to a fellow ICC user !
martin