[libcxx-commits] [PATCH] D129189: [libc++] Add test for algorithm result type alias declarations

Konstantin Varlamov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 6 16:14:43 PDT 2022


var-const added inline comments.


================
Comment at: libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp:21
+
+static_assert(std::is_same_v<in_in_result<int, long>, mismatch_result<int, long>>);
+static_assert(std::is_same_v<in_in_result<int, long>, swap_ranges_result<int, long>>);
----------------
var-const wrote:
> Do we also need to test that the corresponding algorithm returns the right type?
> ```
> static_assert(std::is_same_v<in_in_result<int, long>, mismatch_result<int, long>>);
> static_assert(std::is_same_v<decltype(std::ranges::mismatch(i1, s1, i2, s2)), in_in_result<int, long>>);
> ```
Although to be fair, we do that already in the algorithm test files, so this would be duplicative.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129189



More information about the libcxx-commits mailing list