88
99namespace simply {
1010
11- struct indirect_dispatch : simply::dispatch_affordance_base {
12- template <simply::affordance Affordance>
13- struct type : simply::affordance_base {
14- using affordance_type = Affordance;
15- };
16- };
11+ struct indirect_dispatch : simply::dispatch_affordance_base {};
1712
18- struct inplace_dispatch : simply::dispatch_affordance_base {
19- template <simply::affordance Affordance>
20- struct type : simply::affordance_base {
21- using affordance_type = Affordance;
22- };
23- };
13+ struct inplace_dispatch : simply::dispatch_affordance_base {};
2414
25- template <simply::specialization_of<simply::indirect_dispatch::type> Dispatch,
26- typename Self>
27- requires simply::affordance<Dispatch>
28- struct iface <Dispatch, Self> {
15+ template <typename Self>
16+ struct iface <simply::indirect_dispatch, Self> {
2917 template <typename T>
3018 constexpr iface ([[maybe_unused]] std::in_place_type_t <T> tag)
3119 : vtable_ptr(
@@ -44,16 +32,14 @@ struct iface<Dispatch, Self> {
4432 return static_cast <const base_type &>(*vtable_ptr).fn ;
4533 }
4634
47- using affordance_type = Dispatch::affordance_type ;
35+ using affordance_type = simply:: affordance_type_t <Self> ;
4836 using vtable_type = simply::vtable<affordance_type, Self>;
4937
5038 const vtable_type *vtable_ptr;
5139};
5240
53- template <simply::specialization_of<simply::inplace_dispatch::type> Dispatch,
54- typename Self>
55- requires simply::affordance<Dispatch>
56- struct iface <Dispatch, Self> {
41+ template <typename Self>
42+ struct iface <simply::inplace_dispatch, Self> {
5743 template <typename T>
5844 constexpr iface ([[maybe_unused]] std::in_place_type_t <T> tag)
5945 : vtable(simply::vtable_for<affordance_type, Self, T>) {}
@@ -71,7 +57,7 @@ struct iface<Dispatch, Self> {
7157 return static_cast <const base_type &>(vtable).fn ;
7258 }
7359
74- using affordance_type = Dispatch::affordance_type ;
60+ using affordance_type = simply:: affordance_type_t <Self> ;
7561 using vtable_type = simply::vtable<affordance_type, Self>;
7662
7763 vtable_type vtable;
0 commit comments