Skip to content

Commit 7a6cd7b

Browse files
remove redundant include guard and clarify macro usage
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
1 parent 657e7f7 commit 7a6cd7b

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

libs/core/type_support/include/hpx/type_support/is_replaceable.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515

1616
namespace hpx::experimental {
1717

18+
// P2786R13 defines a single feature-test macro __cpp_trivial_relocatability
19+
// that covers both the core-language keyword and the associated library traits
20+
// (std::is_trivially_relocatable, std::is_replaceable, std::relocate_at).
21+
// The language and library features are bundled in one proposal, so guarding on
22+
// this macro is sufficient to confirm that std::is_replaceable is available.
1823
#if defined(__cpp_trivial_relocatability)
1924
HPX_CXX_CORE_EXPORT template <typename T>
2025
struct is_replaceable : std::is_replaceable<T>

libs/core/type_support/include/hpx/type_support/is_trivially_relocatable.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212

1313
namespace hpx::experimental {
1414

15+
// P2786R13 defines a single feature-test macro __cpp_trivial_relocatability
16+
// that covers both the core-language keyword and the associated library traits
17+
// (std::is_trivially_relocatable, std::is_replaceable, std::relocate_at).
18+
// The language and library features are bundled in one proposal, so guarding on
19+
// this macro is sufficient to confirm that std::is_trivially_relocatable is
20+
// available.
1521
#if defined(__cpp_trivial_relocatability)
1622
template <typename T>
1723
struct is_trivially_relocatable : std::is_trivially_relocatable<T>

libs/core/type_support/include/hpx/type_support/relocate_at.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
#include <cstring>
1616
#include <type_traits>
1717

18-
#if defined(HPX_HAVE_P1144_STD_RELOCATE_AT) || \
19-
defined(__cpp_trivial_relocatability)
20-
#include <memory>
21-
#endif
2218

2319
namespace hpx::detail {
2420

0 commit comments

Comments
 (0)