Describe supported platforms in README.

Better isnan/isinf availabity test(I guess).
This commit is contained in:
Syoyo Fujita 2017-11-15 13:55:14 +09:00
parent b23f6fe492
commit cd1ddf341d
2 changed files with 12 additions and 3 deletions

View File

@ -14,7 +14,13 @@ Work in process(`devel` branch). Very near to release, but need more tests and e
## Features
* Portable C++. C++-03 with STL dependency only.
* Written in portable C++. C++-03 with STL dependency only.
* [x] macOS + clang(LLVM)
* [x] iOS + clang
* [x] Linux + gcc/clang
* [x] Windows + MinGW
* [x] Android + CrystaX(NDK drop-in replacement) GCC
* [x] Web using Emscripten(LLVM)
* Moderate parsing time and memory consumption.
* glTF specification v2.0.0
* [x] ASCII glTF

View File

@ -231,10 +231,13 @@ inline value::value(double n) : type_(number_type), u_() {
if (
#ifdef _MSC_VER
!_finite(n)
#elif __cplusplus >= 201103L || !(defined(isnan) && defined(isinf))
#elif __cplusplus >= 201103L
std::isnan(n) || std::isinf(n)
#else
#elif defined(isnan) && defined(isinf)
isnan(n) || isinf(n)
#else
// ???. No nan&inf check
0
#endif
) {
throw std::overflow_error("");