[libcxx-commits] [PATCH] D99928: [libcxx] [test] Use dedicated types for the invocable concept tests for multiple overloads

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 6 11:59:27 PDT 2021


curdeius added inline comments.


================
Comment at: libcxx/test/std/concepts/concepts.callable/concept.invocable/invocable.compile.pass.cpp:240
+static_assert(!std::invocable<multiple_overloads&, multiple_overloads::AB>);
+static_assert(!std::invocable<multiple_overloads&, multiple_overloads::O>);
+
----------------
Quuxplusone wrote:
> @curdeius wrote:
> > I think that now we test less than before. [...] I'd like to see:
> > `struct DA : A {};`
> 
> I had tested that codepath (that `invocable` deals correctly with implicit-conversions-to-the-parameter-type) by `std::invocable<multiple_overloads, int>` (`int` being implicitly convertible to `B`).
> There's certainly no reason to test all `DA` //and// `DB` //and// `int` — all three are exactly isomorphic, user-defined implicit conversions via non-explicit constructor.
> 
> @curdeius, any objection if I re-remove `DA` and `DB`? (If so: Any objection if I remove `DB` and `B(int)`? If so: I'll remove `DB`.)
I agree that we don't need both DA and DB at the same time, the same way we don't need both A and B at the same time.
So, go on.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99928/new/

https://reviews.llvm.org/D99928



More information about the libcxx-commits mailing list