Skip to content

Commit 4640282

Browse files
burblebeetkoeppe
authored andcommitted
LWG4202 enable-sender should be a variable template
1 parent b4692ce commit 4640282

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

source/exec.tex

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,9 +1946,12 @@
19461946
@\exposconcept{is-sender}@<Sndr> ||
19471947
@\exposconcept{is-awaitable}@<Sndr, @\exposid{env-promise}@<env<>>>; // \ref{exec.awaitable}
19481948

1949+
template<class Sndr>
1950+
inline constexpr bool enable_sender = @\exposconcept{enable-sender}@<Sndr>;
1951+
19491952
template<class Sndr>
19501953
concept @\deflibconcept{sender}@ =
1951-
bool(@\exposconcept{enable-sender}@<remove_cvref_t<Sndr>>) &&
1954+
enable_sender<remove_cvref_t<Sndr>> &&
19521955
requires (const remove_cvref_t<Sndr>& sndr) {
19531956
{ get_env(sndr) } -> @\exposconcept{queryable}@;
19541957
} &&
@@ -1989,6 +1992,17 @@
19891992
starting the resulting operation state
19901993
are permissible completions for \tcode{Sndr} and \tcode{Env}.
19911994

1995+
\pnum
1996+
\remarks
1997+
Pursuant to \ref{namespace.std},
1998+
users may specialize \tcode{enable_sender} to
1999+
\tcode{true} for cv-unqualified program-defined types that
2000+
model \libconcept{sender}, and
2001+
\tcode{false} for types that do not.
2002+
Such specializations shall
2003+
be usable in constant expressions\iref{expr.const} and
2004+
have type \tcode{const bool}.
2005+
19922006
\pnum
19932007
A type models
19942008
the exposition-only concept \defexposconcept{valid-completion-signatures}

0 commit comments

Comments
 (0)