Skip to content

Commit 1636833

Browse files
committed
Re-format and fix template-template bug
I figured out how to run `clang-format` v21.1.6, which appears to be compatible with v21.1.5. I updated the decorators in `test_cpo_connect_awaitable.cpp` to fix the template-template build error.
1 parent 7755ada commit 1636833

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

include/stdexec/__detail/__connect_awaitable.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ namespace STDEXEC
3939
namespace __connect_await
4040
{
4141
// four pointers' worth of space when compiling with Clang or MSVC; five with GCC
42-
static constexpr std::size_t __num_pointers = 4 * (STDEXEC_CLANG() + STDEXEC_MSVC())
43-
+ 5 * STDEXEC_GCC();
42+
static constexpr std::size_t __num_pointers = 4 * (STDEXEC_CLANG() + STDEXEC_MSVC())
43+
+ 5 * STDEXEC_GCC();
4444
static constexpr std::size_t __storage_size = __num_pointers * sizeof(void*) - 1;
4545
static constexpr std::size_t __storage_align = __STDCPP_DEFAULT_NEW_ALIGNMENT__;
4646

@@ -171,9 +171,9 @@ namespace STDEXEC
171171
explicit __awaitable_state(_A&& __awaitable)
172172
noexcept(__nothrow_constructible_from<_Awaitable, _A>)
173173
: __source_awaitable_(static_cast<_A&&>(__awaitable))
174-
{ }
174+
{}
175175

176-
~__awaitable_state() { }
176+
~__awaitable_state() {}
177177

178178
constexpr void construct(__std::coroutine_handle<_Promise> __coro) noexcept(__is_nothrow)
179179
{
@@ -244,9 +244,9 @@ namespace STDEXEC
244244
explicit __awaitable_state(_A&& __awaitable)
245245
noexcept(__nothrow_constructible_from<_Awaitable, _A>)
246246
: __source_awaitable_(static_cast<_A&&>(__awaitable))
247-
{ }
247+
{}
248248

249-
~__awaitable_state() { }
249+
~__awaitable_state() {}
250250

251251
constexpr void construct(__std::coroutine_handle<_Promise> __coro) noexcept(__is_nothrow)
252252
{
@@ -315,9 +315,9 @@ namespace STDEXEC
315315
explicit __awaitable_state(_A&& __awaitable)
316316
noexcept(__nothrow_constructible_from<_Awaitable, _A>)
317317
: __source_awaitable_(static_cast<_A&&>(__awaitable))
318-
{ }
318+
{}
319319

320-
~__awaitable_state() { }
320+
~__awaitable_state() {}
321321

322322
constexpr void construct(__std::coroutine_handle<_Promise> __coro) noexcept(__is_nothrow)
323323
{
@@ -347,7 +347,7 @@ namespace STDEXEC
347347
explicit __awaitable_state(_A&& __awaitable)
348348
noexcept(__nothrow_constructible_from<_Awaitable, _A>)
349349
: __awaiter_(static_cast<_A&&>(__awaitable))
350-
{ }
350+
{}
351351

352352
static constexpr void construct(__std::coroutine_handle<_Promise>) noexcept
353353
{
@@ -514,7 +514,7 @@ namespace STDEXEC
514514
noexcept(__nothrow_move_constructible<_Awaitable>)
515515
: __rcvr_(static_cast<_Receiver&&>(__rcvr))
516516
, __awaiter_(static_cast<_Awaitable&&>(__awaitable))
517-
{ }
517+
{}
518518

519519
__opstate(__opstate&&) = delete;
520520

@@ -666,15 +666,15 @@ namespace STDEXEC
666666
{
667667
template <class, class>
668668
struct __promise
669-
{ };
669+
{};
670670

671671
template <class>
672672
struct __with_await_transform
673-
{ };
673+
{};
674674
} // namespace __connect_await
675675

676676
struct __connect_awaitable_t
677-
{ };
677+
{};
678678

679679
#endif
680680

test/stdexec/cpos/test_cpo_connect_awaitable.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ namespace
3333
public:
3434
explicit constexpr ready_awaitable(T&& t) noexcept
3535
: t_(std::move(t))
36-
{ }
36+
{}
3737

3838
explicit constexpr ready_awaitable(T const & t)
3939
: t_(t)
40-
{ }
40+
{}
4141

4242
static constexpr bool await_ready() noexcept
4343
{
@@ -76,7 +76,7 @@ namespace
7676
FAIL_CHECK("this awaitable should never suspend");
7777
}
7878

79-
static constexpr void await_resume() noexcept { }
79+
static constexpr void await_resume() noexcept {}
8080

8181
ready_awaitable& base() noexcept
8282
{
@@ -91,7 +91,7 @@ namespace
9191

9292
explicit constexpr awaitable_ref(Awaitable& awaitable) noexcept
9393
: awaitable_(&awaitable)
94-
{ }
94+
{}
9595

9696
constexpr auto await_ready() const noexcept(noexcept(awaitable_->await_ready()))
9797
requires requires(Awaitable& a) {
@@ -192,7 +192,7 @@ namespace
192192
explicit constexpr conditionally_suspending_awaitable(bool suspend, U&&... u) noexcept
193193
: suspending_awaitable<T>(std::forward<U>(u)...)
194194
, suspend_(suspend)
195-
{ }
195+
{}
196196

197197
constexpr bool await_suspend(std::coroutine_handle<> coro) noexcept
198198
{
@@ -236,15 +236,15 @@ namespace
236236
}
237237
};
238238

239-
template <class Awaitable, template <class> class Wrapper = std::type_identity_t>
239+
template <class Awaitable, template <class...> class Wrapper = std::type_identity_t>
240240
struct with_as_awaitable
241241
{
242242
template <class... T>
243243
requires std::constructible_from<Awaitable, T...>
244244
explicit(sizeof...(T) == 1) with_as_awaitable(T&&... t)
245245
noexcept(std::is_nothrow_constructible_v<Awaitable, T...>)
246246
: awaitable_(std::forward<T>(t)...)
247-
{ }
247+
{}
248248

249249
template <class Promise>
250250
Wrapper<awaitable_ref<Awaitable>> as_awaitable(Promise&) noexcept
@@ -261,15 +261,15 @@ namespace
261261
Awaitable awaitable_;
262262
};
263263

264-
template <class Awaitable, template <class> class Wrapper = std::type_identity_t>
264+
template <class Awaitable, template <class...> class Wrapper = std::type_identity_t>
265265
struct with_member_co_await
266266
{
267267
template <class... T>
268268
requires std::constructible_from<Awaitable, T...>
269269
explicit(sizeof...(T) == 1) with_member_co_await(T&&... t)
270270
noexcept(std::is_nothrow_constructible_v<Awaitable, T...>)
271271
: awaitable_(std::forward<T>(t)...)
272-
{ }
272+
{}
273273

274274
constexpr Wrapper<awaitable_ref<Awaitable>> operator co_await() noexcept
275275
{
@@ -285,15 +285,15 @@ namespace
285285
Awaitable awaitable_;
286286
};
287287

288-
template <class Awaitable, template <class> class Wrapper = std::type_identity_t>
288+
template <class Awaitable, template <class...> class Wrapper = std::type_identity_t>
289289
struct with_friend_co_await
290290
{
291291
template <class... T>
292292
requires std::constructible_from<Awaitable, T...>
293293
explicit(sizeof...(T) == 1) with_friend_co_await(T&&... t)
294294
noexcept(std::is_nothrow_constructible_v<Awaitable, T...>)
295295
: awaitable_(std::forward<T>(t)...)
296-
{ }
296+
{}
297297

298298
auto& base() noexcept
299299
{
@@ -700,7 +700,7 @@ namespace
700700
return coro.promise().unhandled_stopped();
701701
}
702702

703-
static constexpr void await_resume() noexcept { }
703+
static constexpr void await_resume() noexcept {}
704704
};
705705

706706
TEST_CASE("promise().unhandled_stopped() invokes set_stopped", "[cpo][cpo_connect_awaitable]")

0 commit comments

Comments
 (0)