diff --git a/src/libipc/utility/construct.h b/src/libipc/utility/construct.h index ad21ffd..888cdbd 100644 --- a/src/libipc/utility/construct.h +++ b/src/libipc/utility/construct.h @@ -45,7 +45,7 @@ auto construct(void *p, A &&... args) template void *destroy(T *p) noexcept { -#if defined(LIBIPC_CPP_17) +#if defined(LIBIPC_CPP_17) && !defined(LIBIPC_CC_GNUC) std::destroy_at(p); #else p->~T(); @@ -57,7 +57,7 @@ template void *destroy(T (*p)[N]) noexcept { #if defined(LIBIPC_CPP_20) std::destroy_at(p); -#elif defined(LIBIPC_CPP_17) +#elif defined(LIBIPC_CPP_17) && !defined(LIBIPC_CC_GNUC) std::destroy(std::begin(*p), std::end(*p)); #else for (auto &elem : *p) destroy(std::addressof(elem));