Try to fix travis.

It reverts commit:
https://sourceforge.net/p/angelscript/code/2278/

It looks that it's impossible to detect "real" clang version using compiler definitions, so that we can't check if std::is_trivially_default_constructible is available.

I mean that clang 4.0 on my machine is "newer" than clang 5.0 on travis, because it tries to use gcc 4.8 headers:

/usr/lib/gcc/*x86_64-linux-gnu/4.8*/../../../../include/c++/4.8/type_traits:1211:12:
note: 'has_trivial_default_constructor' declared here
    struct has_trivial_default_constructor

At this stage we can just disable AS_CAN_USE_CPP11 for clang. It was disabled for clang before our angelscript upgrade, so that it's not worse than before.

Note that I don't use clang and I don't really know what are our requirements (for example for Mac OS build). Feel free to revert it after travis upgrade.
This commit is contained in:
Deve 2018-01-29 20:46:55 +01:00
parent 748a65c013
commit 3345fa6e51

View File

@ -402,13 +402,13 @@ typedef void (*asRETURNCONTEXTFUNC_t)(asIScriptEngine *, asIScriptContext *, voi
// Check if the compiler can use C++11 features
#if !defined(_MSC_VER) || _MSC_VER >= 1700 // MSVC 2012
#if !defined(__GNUC__) || defined(__clang__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) // gnuc 4.7 or clang
#if !(defined(__GNUC__) && defined(__cplusplus) && __cplusplus < 201103L) // gnuc and clang require compiler flag -std=c++11
#if !defined(__SUNPRO_CC) // Oracle Solaris Studio
#define AS_CAN_USE_CPP11 1
#endif
#endif
#endif
#if !defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) // gnuc 4.7
#if !(defined(__GNUC__) && defined(__cplusplus) && __cplusplus < 201103L) // g++ -std=c++11
#if !defined(__SUNPRO_CC)
#define AS_CAN_USE_CPP11 1
#endif
#endif
#endif
#endif
// This macro does basically the same thing as offsetof defined in stddef.h, but