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

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 6 11:02:18 PDT 2021


Quuxplusone 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>);
+
----------------
@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`.)


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