[cfe-dev] Help getting started
dblaikie at gmail.com
Mon Jan 2 09:12:24 PST 2012
Sorry, was a bit tired I guess. I meant polymorphic lambdas (template
type parameters) - I wasn't intending to suggest some other construct
you hadn't suggested.
I'm still not sure I follow the ambiguity resolution. Are you saying
this named function template syntax would diverge from lambdas? (in the
sense that a single identifier specifies an unnamed parameter in a
lambda, but an untyped on in this syntax you're proposing)
From: Dave Abrahams
Sent: 1/2/2012 5:17 AM
To: David Blaikie
Subject: Re: [cfe-dev] Help getting started
on Sun Jan 01 2012, David Blaikie <dblaikie-AT-gmail.com> wrote:
> Interesting post. One side question:
> You mention in your post that there might be a way to do variadic
> (essentially template) lambdas by simple omitting the type name.
Support for variadics is an interesting possibility that I hadn't
> How do you solve the ambiguity between an unnamed parameter and an
> untyped one?
By using a syntax that says "I'm leaving out the type names," i.e., by
starting with "" instead of "auto" or a type name.
> As for implementing your experimental terse function template
> definition syntax - somewhat naively (I'm by no means an expert in
> these matters) i expect it'll end up halfway between the two approaches
> you've mentioned.
> My own approach to adding features to clang so far has been to write
> the test case first, see where clang fails (break on whatever error is
> produced) & walk up Clang's stack from there looking for the spot that
> might be a reasonable place to add the functionality.
That sounds interesting, thanks. I might take that approach.
More information about the cfe-dev