Skip to content

Commit 4514948

Browse files
snarkmasterfacebook-github-bot
authored andcommitted
Simpler PickTaskWrapper fallback logic
Summary: ispeters correctly points out that the "old compiler fallback" doesn't need the `<unsafe, false>` specialization, since that's redundant with its more generic `<Safety, false>` specialization, which has identical consequences. There's no real problem with the old code IIUC, but this is slightly easier to read. Reviewed By: ispeters Differential Revision: D77848551 fbshipit-source-id: c98a854ef832970b57c62b8ef080525c0e6770ad
1 parent 33c9ffb commit 4514948

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

third-party/folly/src/folly/coro/detail/PickTaskWrapper.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ struct identity_metafunction {
6262
template <safe_alias, bool /*must await immediately (now)*/>
6363
struct PickTaskWrapperImpl;
6464

65+
#if FOLLY_HAS_IMMOVABLE_COROUTINES
66+
6567
template <>
6668
struct PickTaskWrapperImpl<safe_alias::unsafe, /*await now*/ false> {
6769
template <typename T>
@@ -70,8 +72,6 @@ struct PickTaskWrapperImpl<safe_alias::unsafe, /*await now*/ false> {
7072
using TaskWithExecutor = TaskWithExecutor<T>;
7173
};
7274

73-
#if FOLLY_HAS_IMMOVABLE_COROUTINES
74-
7575
template <>
7676
struct PickTaskWrapperImpl<safe_alias::unsafe, /*await now*/ true> {
7777
template <typename T>

0 commit comments

Comments
 (0)