Xcode support for lambda functions

I have a program encoded in VS that I am trying to transfer to Xcode. There are several issues that I have encountered, including using lambda functions. Since Xcode uses gcc 4.2 and thus does not support C ++ 11, can I use any lambda functions?

If I want to work with code from my laptop without rewriting most of the code, will I need to install gcc 4.6 and compile it using the terminal?

+6
source share
1 answer

You have several options:

  • Rewrite the code in the C ++ 2003 standard.
  • Install GCC, which supports the C ++ 11 functions used in the code, and not use Xcode (you can use other IDEs, for example QtCreator or Eclipse CDT).
  • Wait while Xcode comes with the C ++ LLVM compiler, which supports C ++ 11 features.
+2
source

Source: https://habr.com/ru/post/897837/


All Articles