@@ -32,15 +32,25 @@ namespace beman::execution::detail {
3232struct no_completion_signatures_defined_in_sender {};
3333
3434/* !
35- * \brief Primary template declaration for the customization of sender completion signatures.
35+ * \brief Concept to check if an execution tag has a valid get_completion_signatures member template.
36+ * \note Extracted into a concept to work around an MSVC bug that occurs only header builds where
37+ * 'requires' expressions containing dependent types incorrectly evaluate to false when placed
38+ * directly inside a function template body.
3639 * \headerfile beman/execution/execution.hpp <beman/execution/execution.hpp>
3740 * \internal
3841 */
42+ template <typename Tag, typename Sender, typename ... Env>
43+ concept has_valid_complsig_specialization = requires { Tag::template get_completion_signatures<Sender, Env...>(); };
3944
45+ /* !
46+ * \brief Primary template declaration for the customization of sender completion signatures.
47+ * \headerfile beman/execution/execution.hpp <beman/execution/execution.hpp>
48+ * \internal
49+ */
4050template <typename Sender, typename ... Env>
4151consteval auto get_completion_signatures_for_helper () {
4252 using tag_t = ::std::remove_cvref_t <::beman::execution::tag_of_t <::std::remove_cvref_t <Sender>>>;
43- if constexpr (requires { tag_t :: template get_completion_signatures< Sender, Env...>(); } )
53+ if constexpr (has_valid_complsig_specialization< tag_t , Sender, Env...>)
4454 return tag_t ::template get_completion_signatures<Sender, Env...>();
4555 else
4656 return ::beman::execution::detail::no_completion_signatures_defined_in_sender{};
0 commit comments