Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-12-09 13:58:56

From: "vladimir josef sykora" <vladimir.sykora_at_[hidden]>
> template <class Sequence>
> struct foo {
> };
> // usage example :
> typedef boost::mpl::vector<...> types;
> typedef foo<types> foo_types;
> std::vector<foo_types> std_vect_foos;
> std_vect_foos.push_back(foo<types>());
> When mpl::copy_backward is present (from boost/mpl/insert.hpp for
> I get this error (gcc 3.2):
> `template<class
> Sequence, class State, class BinaryOp> struct
> is
> not a function,
> conflict with `
> template<class _BI1, class _BI2> _BI2 std::copy_backward(_BI1, _BI1,
> _BI2)'
> in call to `copy_backward'
> Since std::copy_backward is found via ADL, I consider this IMHO a
> restriction to the use of mpl::insert & mpl::erase.

This is a g++ specific "feature", or rather a combination of two "features".

First, the standard library uses unqualified calls to standard library

Second, argument dependent lookup finds class names (such as

Many people consider both to be defects.

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