Repository navigation
[GNATS 23855] Spurious diagnostic for no instance of overload function for asio_require_fn #123
jhsedg
started this conversation in
Issue Triage - General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Customer bug ID
asio/test/execution/blocking_adaptation and 5 others , gnats/23855.C (preprocessed), 23855a.C (reducded)
Description
This is the reduced test case:
namespace std {
template class decay { typedef _Tp type; };
template <bool, typename = void> struct enable_if;
template struct enable_if<true, _Tp> { typedef _Tp type; };
} // namespace std
using std::decay;
using std::enable_if;
namespace asio_require_fn {
enum overload_type { identity };
template <typename, typename = void> struct call_traits;
template
struct call_traits<
void(Property),
typename enable_if<decay::type::is_requirable>::type> {
static constexpr overload_type overload = identity;
};
struct impl {
template <typename T, typename Property>
typename enable_if<call_traits<void(Property)>::overload == identity>::type
operator()(T, Property);
void operator()();
};
struct static_instance {
static impl instance;
};
} // namespace asio_require_fn
namespace blocking_adaptation {
template <int = 0> struct disallowed_t {
static constexpr bool is_requirable = true;
};
} // namespace blocking_adaptation
template <void()> void run_test();
struct ex_cq_nr {};
template <typename, typename, typename> void test_require() {
asio_require_fn::static_instance::instance(
ex_cq_nr(), blocking_adaptation::disallowed_t<>());
}
main() { run_test<test_require<ex_cq_nr, int, int>>; }
[ellen@lin1 cwg]$ (nrt)eccp --c++20 -tused /tmp/blocking_adapt.reduced.C
"/tmp/blocking_adapt.reduced.C", line 35: error: no instance of overloaded
function "asio_require_fn::impl::operator()" matches the argument
list
argument types are: (ex_cq_nr,
blocking_adaptation::disallowed_t<0>)
object type is: asio_require_fn::impl
asio_require_fn::static_instance::instance(
^
All reactions