Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-06-14 15:46:44


Howard Hinnant wrote:

> One also has to watch out for ADL in the namespaces of template
> arguments (another common accidental use of ADL). For example:
>
> std::vector<N::MyClass, M::MyAllocator> v;
>
> foo(v); // searches std, N, M

One common problem of this kind is

template< class T, class A = std::allocator<T> > class X;

X<int> x;

foo( x ); // searches std


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net