CAMOBAP
CAMOBAP

Reputation: 5657

Andorid NDK | How to determine which C++ standard supported by NDK 9c

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?

Upvotes: 2

Views: 2203

Answers (1)

TemplateRex
TemplateRex

Reputation: 70526

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.

Upvotes: 3

Related Questions