Skip to content

Commit

Permalink
add condition for libstdc++ >= 7
Browse files Browse the repository at this point in the history
  • Loading branch information
toge committed Nov 11, 2021
1 parent 0ac6a1d commit 047ad82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/xtensor/xutils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,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)

Expand Down

0 comments on commit 047ad82

Please sign in to comment.