Question

I want to try new features of c++ (especially C++11) on my Android native project.

How to determine which C++ Standard supported by NDK Revision 9c?

Update

For instance in case

int arr[] = {1,2,3,4,5};
for(int& e : arr)
{
    e = e*e;
}

I got

error: range-based-for loops are not allowed in C++98 mode

Is this means that NDK support only C++98 Standard?

Was it helpful?

Solution

According to the Android NDK docs, version 9c supports gcc 4.8 and Clang 3.3, both of which are fully C++11 compliant. To actually make use of C++11, you need to compile with the flag -std=c++11.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top