Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-30 06:52:47


From: "Gabriel Dos Reis" <Gabriel.Dos-Reis_at_[hidden]>
> "Peter Dimov" <pdimov_at_[hidden]> writes:
>
> | This state of affairs makes sense to me, since if we adopt the other
> | alternative, that f<int> is allowed, parsing the construct:
> |
> | identifier '<' expression
> |
> | would be much more complicated. Exactly how complicated I don't know.
:-)
>
> Exactly in *which ways* do you think it will make parsing much more
> complicated?

Sorry, I'm not a compiler expert.

My line of thought was:

namespace N1
{
    struct A {};
    template<class T> void f(T t);
}

namespace N2
{
    struct A {};
    template<int I> void f(A);
}

namespace N3
{
    struct A {};
    template<void * p> void f(A);
}

int main()
{
    using ?::A;
    f<expression>(A());
}

This might not turn out to be a problem.

> My personal belief is that a DR should be filed.

Go for it.

--
Peter Dimov
Multi Media Ltd.

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