type deduction c++14

Hi, I was testing some C++14 features with the latest version of mingw, but it seems the auto println line does not work.

1
2
  auto println=[](const auto& out){cout<<out<<endl;};
  println("test");


This is to test automatic lambda parameters. I already tried binary literals, and it worked.
The error is: println does not name a type
How do I fix this?

Aceix.
Have you enabled the c++ 14 compiler flag and which version of c++ are you using. The full feature set of 14 is currently incomplete.
I tried -std=c++14 but it seems its not the right syntax.

Aceix.
I think it is -std=c++1y though I could be wrong. Also, I think clang has more c++14 features implemented than mingw.
Last edited on
Topic archived. No new replies allowed.