Boost logo

Boost Users :

Subject: Re: [Boost-users] [Proto] POD expression can't be used in std::vector
From: Eric Niebler (eric_at_[hidden])
Date: 2008-11-23 14:40:41

Joel Falcou wrote:
> Eric Niebler a écrit :
>> Looks like the intel compiler has a bug with ADL. You can work around
>> it by changing the definition of cmplx to this:
>> template<class T, typename Dummy = bp::is_proto_expr>
>> struct cmplx ...
>> Note the extra Dummy template parameter, which will cause ADL to find
>> the operators defined in Proto's namespace.
> Perfect as usual :) This did the trick. I'll propagate this fix to all
> my terminal entity then.
> Should I report this to Intel bug system however ?

You should, if you (or someone) can confirm it happens on Intel 11.0
also. Here is a simple repro:

namespace N
     struct S {};
     template<class T, class U>
     void operator+(T const &, U const &) {}

template<class T> struct X {};
struct Y : X<N::S> {};

int main()
     Y y;

The above code compiles with gcc but doesn't with Intel 10.1

Eric Niebler
BoostPro Computing

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at