Skip to content

Commit fc0c713

Browse files
committed
centralize handling of annoying macros and warnings in prologue/epilogue headers
1 parent 017d88f commit fc0c713

97 files changed

Lines changed: 481 additions & 49 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clangd

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ If:
88

99
---
1010

11+
If:
12+
PathMatch: .*/stdexec/__detail/__epilogue[.]hpp
13+
CompileFlags:
14+
Add:
15+
- -include stdexec/__detail/__prologue.hpp
16+
17+
---
18+
1119
# Apply a config conditionally to all CUDA files
1220
If:
1321
PathMatch: .*\.cuh?$

include/stdexec/__detail/__affine.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include "__senders.hpp"
2323
#include "__unstoppable.hpp"
2424

25+
#include "__prologue.hpp"
26+
2527
namespace STDEXEC
2628
{
2729
struct _CANNOT_MAKE_SENDER_AFFINE_TO_THE_STARTING_SCHEDULER_;
@@ -166,3 +168,5 @@ namespace STDEXEC
166168
};
167169
};
168170
} // namespace STDEXEC
171+
172+
#include "__epilogue.hpp"

include/stdexec/__detail/__any.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
#include <type_traits>
3434
#include <utility>
3535

36-
STDEXEC_PRAGMA_PUSH()
36+
#include "__prologue.hpp"
37+
3738
STDEXEC_PRAGMA_IGNORE_GNU("-Wredundant-consteval-if")
3839
STDEXEC_PRAGMA_IGNORE_GNU("-Warray-bounds")
3940

@@ -2179,4 +2180,4 @@ namespace STDEXEC::__any
21792180

21802181
// NOLINTEND(moderize-use-override)
21812182

2182-
STDEXEC_PRAGMA_POP()
2183+
#include "__epilogue.hpp"

include/stdexec/__detail/__any_allocator.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
#include "__memory.hpp"
2424
#include "__typeinfo.hpp"
2525

26-
STDEXEC_PRAGMA_PUSH()
26+
#include "__prologue.hpp"
27+
2728
STDEXEC_PRAGMA_IGNORE_GNU("-Warray-bounds")
2829

2930
namespace STDEXEC
@@ -124,4 +125,4 @@ namespace STDEXEC
124125
__any_allocator(std::allocator<void>) -> __any_allocator<std::byte>;
125126
} // namespace STDEXEC
126127

127-
STDEXEC_PRAGMA_POP()
128+
#include "__epilogue.hpp"

include/stdexec/__detail/__as_awaitable.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
#include <system_error>
3636
#include <thread>
3737

38-
STDEXEC_PRAGMA_PUSH()
38+
#include "__prologue.hpp"
39+
3940
STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces")
4041
STDEXEC_PRAGMA_IGNORE_MSVC(4714) // marked as __forceinline not inlined
4142

@@ -476,4 +477,4 @@ namespace STDEXEC
476477
#endif
477478
} // namespace STDEXEC
478479

479-
STDEXEC_PRAGMA_POP()
480+
#include "__epilogue.hpp"

include/stdexec/__detail/__associate.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#include <type_traits>
3737
#include <utility>
3838

39+
#include "__prologue.hpp"
40+
3941
namespace STDEXEC
4042
{
4143
/////////////////////////////////////////////////////////////////////////////
@@ -285,3 +287,5 @@ namespace STDEXEC
285287
struct __sexpr_impl<associate_t> : __associate::__associate_impl
286288
{};
287289
} // namespace STDEXEC
290+
291+
#include "__epilogue.hpp"

include/stdexec/__detail/__atomic.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828

2929
#include <memory>
3030

31-
STDEXEC_PRAGMA_PUSH()
31+
#include "__prologue.hpp"
32+
3233
STDEXEC_PRAGMA_IGNORE_GNU("-Wdeprecated-declarations")
3334
STDEXEC_PRAGMA_IGNORE_EDG(deprecated_entity)
3435
STDEXEC_PRAGMA_IGNORE_MSVC(4996) // 'foo': was declared deprecated
@@ -244,4 +245,4 @@ namespace STDEXEC::__std
244245

245246
} // namespace STDEXEC::__std
246247

247-
STDEXEC_PRAGMA_POP()
248+
#include "__epilogue.hpp"

include/stdexec/__detail/__atomic_intrusive_queue.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
#include <cassert>
2525

26+
#include "__prologue.hpp"
27+
2628
namespace STDEXEC
2729
{
2830

@@ -78,3 +80,5 @@ namespace STDEXEC
7880
};
7981

8082
} // namespace STDEXEC
83+
84+
#include "__epilogue.hpp"

include/stdexec/__detail/__awaitable.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include "__config.hpp"
2121
#include "__meta.hpp"
2222

23+
#include "__prologue.hpp"
24+
2325
namespace STDEXEC
2426
{
2527
#if !STDEXEC_NO_STDCPP_COROUTINES()
@@ -108,3 +110,5 @@ namespace STDEXEC
108110

109111
#endif
110112
} // namespace STDEXEC
113+
114+
#include "__epilogue.hpp"

include/stdexec/__detail/__basic_sender.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232

3333
#include <cstddef>
3434

35-
STDEXEC_PRAGMA_PUSH()
35+
#include "__prologue.hpp"
36+
3637
STDEXEC_PRAGMA_IGNORE_GNU("-Wmissing-braces")
3738

3839
namespace STDEXEC
@@ -461,4 +462,4 @@ namespace STDEXEC
461462
} // namespace __detail
462463
} // namespace STDEXEC
463464

464-
STDEXEC_PRAGMA_POP()
465+
#include "__epilogue.hpp"

0 commit comments

Comments
 (0)