diff --git a/include/xtensor/xutils.hpp b/include/xtensor/xutils.hpp index 5a3f31b..1e99c9b 100644 --- a/include/xtensor/xutils.hpp +++ b/include/xtensor/xutils.hpp @@ -612,12 +612,16 @@ namespace xt /******************************************** * xtrivial_default_construct implemenation * ********************************************/ - +#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 7 +// has_trivial_default_constructor has not been available since libstdc++-7. +#define XTENSOR_GLIBCXX_USE_CXX11_ABI 1 +#else #if defined(_GLIBCXX_USE_CXX11_ABI) #if _GLIBCXX_USE_CXX11_ABI || (defined(_GLIBCXX_USE_DUAL_ABI) && !_GLIBCXX_USE_DUAL_ABI) #define XTENSOR_GLIBCXX_USE_CXX11_ABI 1 #endif #endif +#endif #if !defined(__GNUG__) || defined(_LIBCPP_VERSION) || defined(XTENSOR_GLIBCXX_USE_CXX11_ABI)