This is the mail archive of the gcc@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: Help requested on C++ template syntax (for Emacs development).


Hi, Ian!

On Tue, Jun 10, 2008 at 12:05:20PM -0700, Ian Lance Taylor wrote:
> Ian Lance Taylor <iant@google.com> writes:

> > Alan Mackenzie <acm@muc.de> writes:

> >> I'm thinking of things like

> >>     foo (a < b, c > d);

[ .... ]

> Oh, wait, I forgot about constructors.  This is valid C++ code:

> template <int a1, int a2> class a;

> class foo
> {
>   foo (a < b, c > d);
> };

> extern void quux (int, int);

> void bar()
> {
>   quux (e < b, c > d);
> }

> Inside the class foo, you've got a template, inside the function bar,
> you've got a function call.

> I think you're going to have a hard time with this.

Er, yes.  ;-)  Thank you very much for all the help.  It's going to take
some while to sink in.  C++ is a difficult language.  Hopefully, in a few
months time, Emacs will be doing better than it currently is.

> Ian

-- 
Alan Mackenzie (Nuremberg, Germany).


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