Skip to content

Commit bc487d5

Browse files
committed
[FOLD]
1 parent 18f7077 commit bc487d5

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

include/boost/capy/io/write_now.hpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,19 @@ class write_now
193193
}
194194

195195
template<class A>
196+
#if BOOST_CAPY_WRITE_NOW_WORKAROUND
197+
// BISECT: no if-constexpr, fixed return type
198+
erased_io_awaiter
199+
await_transform(A&&)
200+
{
201+
return {};
202+
}
203+
#else
196204
auto await_transform(A&& a)
197205
{
198206
using decayed = std::decay_t<A>;
199207
if constexpr (IoAwaitable<decayed>)
200208
{
201-
#if BOOST_CAPY_WRITE_NOW_WORKAROUND
202-
// BISECT: discard awaitable, return
203-
// suspend_always clone
204-
(void)a;
205-
return erased_io_awaiter{};
206-
#else
207209
struct wrapper
208210
{
209211
decayed inner_;
@@ -228,13 +230,13 @@ class write_now
228230
};
229231
return wrapper{
230232
std::forward<A>(a), this};
231-
#endif
232233
}
233234
else
234235
{
235236
return std::forward<A>(a);
236237
}
237238
}
239+
#endif
238240

239241
static void*
240242
operator new(

0 commit comments

Comments
 (0)