문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top