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

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


var-const requested changes to this revision.
var-const added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp:9
+
+// <algorithm>
+
----------------
You probably need to add `UNSUPPORTED`.


================
Comment at: libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp:18
+
+static_assert(std::is_same_v<in_fun_result<int, long>, for_each_result<int, long>>);
+static_assert(std::is_same_v<in_fun_result<int, long>, for_each_n_result<int, long>>);
----------------
Optional nit: any reason not to use `same_as`?


================
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>>);
----------------
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>>);
```


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