@@ -15,36 +15,31 @@ import mcpplibs.primitives.underlying;
1515
1616export namespace mcpplibs ::primitives::operations {
1717
18- template <typename T>
19- concept primitive_instance = requires {
20- typename primitives::meta::traits<
21- std::remove_cvref_t <T>>::value_type;
22- };
23-
24- template <operation OpTag, primitive_instance Lhs, primitive_instance Rhs,
18+ template <operation OpTag, meta::primitive_type Lhs,
19+ meta::primitive_type Rhs,
2520 typename ErrorPayload = policy::error::kind>
2621struct dispatcher_meta {
2722 using lhs_primitive = std::remove_cvref_t <Lhs>;
2823 using rhs_primitive = std::remove_cvref_t <Rhs>;
2924
30- using lhs_traits = primitives:: meta::traits<lhs_primitive>;
31- using rhs_traits = primitives:: meta::traits<rhs_primitive>;
25+ using lhs_traits = meta::traits<lhs_primitive>;
26+ using rhs_traits = meta::traits<rhs_primitive>;
3227
3328 using lhs_value_type = lhs_traits::value_type;
3429 using rhs_value_type = rhs_traits::value_type;
3530
3631 using lhs_rep = underlying::traits<lhs_value_type>::rep_type;
3732 using rhs_rep = underlying::traits<rhs_value_type>::rep_type;
3833
39- using lhs_type_policy = typename lhs_traits::type_policy;
40- using lhs_value_policy = typename lhs_traits::value_policy;
41- using lhs_error_policy = typename lhs_traits::error_policy;
42- using lhs_concurrency_policy = typename lhs_traits::concurrency_policy;
34+ using lhs_type_policy = lhs_traits::type_policy;
35+ using lhs_value_policy = lhs_traits::value_policy;
36+ using lhs_error_policy = lhs_traits::error_policy;
37+ using lhs_concurrency_policy = lhs_traits::concurrency_policy;
4338
44- using rhs_type_policy = typename rhs_traits::type_policy;
45- using rhs_value_policy = typename rhs_traits::value_policy;
46- using rhs_error_policy = typename rhs_traits::error_policy;
47- using rhs_concurrency_policy = typename rhs_traits::concurrency_policy;
39+ using rhs_type_policy = rhs_traits::type_policy;
40+ using rhs_value_policy = rhs_traits::value_policy;
41+ using rhs_error_policy = rhs_traits::error_policy;
42+ using rhs_concurrency_policy = rhs_traits::concurrency_policy;
4843
4944 static constexpr bool policy_group_consistent =
5045 std::is_same_v<lhs_type_policy, rhs_type_policy> &&
@@ -85,15 +80,17 @@ struct dispatcher_meta {
8580 ErrorPayload>;
8681};
8782
88- template <operation OpTag, primitive_instance Lhs, primitive_instance Rhs,
83+ template <operation OpTag, primitives::meta::primitive_type Lhs,
84+ primitives::meta::primitive_type Rhs,
8985 typename ErrorPayload = policy::error::kind>
9086using dispatch_result_t = std::expected<
9187 typename dispatcher_meta<OpTag, Lhs, Rhs, ErrorPayload>::common_rep,
9288 ErrorPayload>;
9389
9490// Dispatcher pipeline: compile-time negotiation plus runtime chain
9591// (concurrency -> value -> error) through selected policy handlers.
96- template <operation OpTag, primitive_instance Lhs, primitive_instance Rhs,
92+ template <operation OpTag, primitives::meta::primitive_type Lhs,
93+ primitives::meta::primitive_type Rhs,
9794 typename ErrorPayload = policy::error::kind>
9895constexpr auto dispatch (Lhs const &lhs, Rhs const &rhs)
9996 -> dispatch_result_t<OpTag, Lhs, Rhs, ErrorPayload> {
0 commit comments