Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2003-09-17 12:04:36


Joel de Guzman wrote:
> Peter Dimov <pdimov_at_[hidden]> wrote:
>
> > Human readers will find it even
> > less tolerable, of course. Also:
> >
> > #include <list>
> > #include <memory>
> >
> > template< class T, class A = std::allocator<T> > struct X {};
> >
> > template<class T, class A> void list(X<T, A> const & x)
> > {
> > }
> >
> > int main()
> > {
> > X<int> x;
> > list(x);
> > }
> >
> >
> > All we can do is submit a g++ bug.
>
> Oh well... Sigh :-(
>
> template <class T0 = mpl::void_, class T1 = mpl::void_, .... class TN
= mpl::void_, >
> struct tuple {...};
>
> The TR1 tuples implementation... Now all the code that uses this gets
*infected* !!!
> Yet one more reason to avoid directly exposing MPL types in the API, I
guess.

FWIW, I had the same exact problem for variant with GCC. I had to workaround
by defining my own detail::variant::void_ type and then a 'convert_void'
template that would change detail::variant::void_ to mpl::void_. Not very
pretty.

If this is really how the language is supposed to behave, I think it should
be changed.

Eric


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk