Skip to content

Commit

Permalink
Merge pull request #383 from AMS21/is_destructible_intrinsic_clang
Browse files Browse the repository at this point in the history
Clang supports the `is_destructible` intrinsic since 16.0.0
  • Loading branch information
AMS21 authored Sep 12, 2024
2 parents 1a2b4cd + 49143b2 commit aebb1cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

#if !defined(PHI_IS_DESTRUCTIBLE) && !defined(PHI_SUPPORTS_IS_DESTRUCTIBLE)

# if PHI_COMPILER_IS(MSVC)
# if PHI_COMPILER_IS_ATLEAST(CLANG, 16, 0, 0) || PHI_COMPILER_IS(APPLECLANG) || \
PHI_COMPILER_IS(EMCC) || PHI_COMPILER_IS(MSVC)
# define PHI_IS_DESTRUCTIBLE(type) __is_destructible(type)
# define PHI_SUPPORTS_IS_DESTRUCTIBLE() 1
# else
Expand Down
4 changes: 2 additions & 2 deletions libs/PhiCore/include/phi/type_traits/is_destructible.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
DETAIL_PHI_BEGIN_NAMESPACE()

template <typename TypeT>
struct is_destructible : integral_constant<bool, PHI_IS_DESTRUCTIBLE(TypeT)>
struct is_destructible : public integral_constant<bool, PHI_IS_DESTRUCTIBLE(TypeT)>
{};

template <typename TypeT>
struct is_not_destructible : integral_constant<bool, !PHI_IS_DESTRUCTIBLE(TypeT)>
struct is_not_destructible : public integral_constant<bool, !PHI_IS_DESTRUCTIBLE(TypeT)>
{};

# if PHI_HAS_FEATURE_VARIABLE_TEMPLATE()
Expand Down

0 comments on commit aebb1cc

Please sign in to comment.