<limits> for std::numeric_limits?

535 views
Skip to first unread message

Wex

unread,
Dec 28, 2010, 2:27:16 PM12/28/10
to android-ndk
It appears that the standard <limits> header which defines the
std::numeric_limits template does not exist in Android NDK (r5 and
2.3)?

OTOH, the old-school C headers, <climits> and <cfloat> do exist, so
you can use specific values, like FLT_MAX instead of
std::numeric_limits<float>.

Am I missing something here? Does the new support for STLPort include
<limits>?

Devnull

unread,
Dec 28, 2010, 9:18:12 PM12/28/10
to android-ndk
Both the GNU libstdc++ and STLPort will give you an implementation of
<limits>. In your Application.mk, you can add "APP_STL :=
stlport_static" (without quotes) for instance, and you will be able to
include <limits>.

TD

unread,
Aug 10, 2015, 10:43:24 AM8/10/15
to android-ndk
I was trying to add glm library in android ndk and was facing problem
" fatal error: limits: No such file or directory "
Adding APP_STL := stlport_static
in my  Application.mk solved my problem. Thanks alot.

Reply all
Reply to author
Forward
0 new messages