Skip to content

Commit 4df3fec

Browse files
committed
More refinements
1 parent 1c5aa45 commit 4df3fec

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/include/elements/element/indirect.hpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212

1313
namespace cycfi::elements
1414
{
15+
////////////////////////////////////////////////////////////////////////////
16+
// TMP code makes `indirect_receiver` derive from `receiver_base` if the
17+
// Element derives from `receiver_base`, and implements the `value` getter
18+
// and setter member functions.
19+
////////////////////////////////////////////////////////////////////////////
1520
template <typename Indirect, concepts::Element Element>
1621
struct indirect_receiver {};
1722

1823
template <typename Indirect, concepts::Element Element>
19-
requires requires(Element e) {
20-
{ e } -> std::derived_from<receiver_base>;
21-
}
24+
requires std::is_base_of_v<receiver_base, std::decay_t<Element>>
2225
struct indirect_receiver<Indirect, Element> : receiver_base
2326
{
2427
using receiver_type = typename Element::receiver_type;

0 commit comments

Comments
 (0)