This is the mail archive of the 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 1/3] Support lambda templates.

On 12.08.2013 16:47, Jason Merrill wrote:
On 08/11/2013 03:49 PM, Adam Butcher wrote:
+      if (cxx_dialect < cxx1y || flag_iso)
+	cp_parser_error (parser,
+			 "lambda templates are only available with "
+			 "-std=gnu++1y");

Normally we only use flag_iso to disable extensions that can change
the meaning of conforming code, which I don't think is the case here.
For pure extensions, we prefer to use a pedwarn.

Okay.  Though I'm not sure how to implement exactly what we discussed
before with pedwarn.  Namely:

On 07.08.2013 16:59, Jason Merrill wrote:
On 08/07/2013 03:52 AM, Adam Butcher wrote:
I'm not sure which dialect guards to put these features behind though.

a) Generic lambdas created fully implicitly via 'auto params' should be accepted with -std=c++1y and -std=gnu++1y since it is actually spec'd by
     the draft.

b) Generic lambdas created with an explicit template parameter list should be
     accepted with -std=gnu++1y only.

c) Generalized implicit function templates should be accepted by -std=gnu++1y

This makes sense to me.  Or perhaps add (c) to the concepts lite
flag, when there is one.

Presumably with pedwarn it would need to be relaxed to simply
   "accepted with -std=c++1y or -std=gnu++1y"
for all? flag_iso was the only thing I could find to discriminate between gnu++1y
and c++1y?

+	      (DECL_TI_TEMPLATE (decl)) != decl)

This needs reformatting so that the arguments to a macro aren't to
the left of the macro name.



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