0

I was just trying to learn some features of lambda Tried one of the example provided here

How does generic lambda work in C++14?

auto glambda = [](auto a) { return a; };

But I don't know for some reason xcode complains about it

auto not allowed in lambda parameter

auto not allowed in lambda parameter

1) Something I am missing in the installation or library

Will Appreciate justification for any down vote

Hariom Singh
  • 3,308
  • 5
  • 26
  • 50

1 Answers1

1

Select your project in the left-hand panel in Xcode. Then choose the Build Settings tab. Type "C++ Language" in the filter at the top right. And then change the setting for the dialect to C++14 or GNU++14.

Where to change the compiler setting to enable C++14

combinatorial
  • 8,546
  • 4
  • 39
  • 57
  • Great it worked thanks a lot . I think your answer is more helpful for a new user of xcode like me. has more info then https://stackoverflow.com/questions/33358313/cant-get-c14-using-xcode-7-0-1 – Hariom Singh Aug 13 '17 at 23:36