This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][C++] Fix PR29433, make C++ use a lot less time/memory


Mark Mitchell <mark@codesourcery.com> writes:

[...]

| template <int I>
| void f() {
|   ... C<I> ... // error here
| }
| 
| and gets an error about "C<J>" that's very confusing -- especially if
| there's another "J" in scope.  I like the EDG approach of saying "C<#1>
| [#1 = I]" in this kind of situation.

We already have the de Bruijn notation for template parameters in
place, so if that is needed, it should be no-brainer.  A small issue
is that our canonical notation includes both the level and the index.
We would just strip out the level if not needed, e.g. when it is 1.

-- Gaby


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]