@@ -129,8 +129,7 @@ concept sync = (is_sync<Args>::value && ...);
129129// - OR a pointer to a non-member (global) function
130130// - OR the type is sync
131131template <typename T>
132- struct is_send : std::integral_constant<
133- bool ,
132+ struct is_send : std::bool_constant<
134133 (! ((std::is_lvalue_reference_v<T>
135134 && ! std::is_function_v<std::remove_cvref_t <T>>)
136135 || (std::is_pointer_v<std::remove_extent_t <std::decay_t <T>>>
@@ -144,6 +143,37 @@ struct is_send : std::integral_constant<
144143 || is_sync_v<T>)>
145144{};
146145
146+ // This tries to mimic the logic in the reflection is_send_type function but has compile template errors...
147+ // template <typename T>
148+ // struct is_send_test :
149+ // std::bool_constant<std::conditional_t<std::is_function<std::remove_pointer_t<std::remove_cvref_t<T>>>::type,
150+ // std::false_type,
151+ // std::true_type>::type>
152+ // // std::negate<std::is_member_function_pointer<std::remove_cvref_t<T>>>,
153+ // // std::conditional<std::is_lvalue_reference_v<std::remove_extent_t<T>>
154+ // // || std::is_pointer_v<T>,
155+ // // std::false_type,
156+ // // std::conditional<std::is_arithmetic_v<T>,
157+ // // std::true_type,
158+ // // std::is_rvalue_reference<T>>>>::type>
159+ // {};
160+ //
161+ // static_assert(is_send_test<int>::value);
162+
163+ // bool,
164+ // (! ((std::is_lvalue_reference_v<T>
165+ // && ! std::is_function_v<std::remove_cvref_t<T>>)
166+ // || (std::is_pointer_v<std::remove_extent_t<std::decay_t<T>>>
167+ // && ! is_function_pointer_v<std::decay_t<T>>) // This shouldn't include non-member function pointers
168+ // || is_lambda_v<T>))
169+ // &&
170+ // (std::is_move_constructible_v<T>
171+ // || (is_function_pointer_v<std::decay_t<T>>
172+ // && ! std::is_member_function_pointer_v<std::decay_t<T>>)
173+ // || std::is_function_v<std::decay_t<T>>
174+ // || is_sync_v<T>)>
175+ // {};
176+
147177// Test doing function first
148178// template <typename T>
149179// struct is_send : std::integral_constant<
0 commit comments