[libcxx-commits] [PATCH] D117517: [libc++][test] test in_in_result convertible requirements

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 18 11:31:41 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6322cb4890db: [libc++][test] test in_in_result convertible requirements (authored by philnik).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117517

Files:
  libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp


Index: libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
===================================================================
--- libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
+++ libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
@@ -54,6 +54,12 @@
 static_assert(std::is_convertible_v<         const std::ranges::in_in_result<int, int>&&, std::ranges::in_in_result<long, long>>);
 static_assert(!std::is_nothrow_convertible_v<const std::ranges::in_in_result<int, int>&&, std::ranges::in_in_result<long, long>>);
 
+struct NotConvertible {};
+static_assert(!std::is_convertible_v<std::ranges::in_in_result<NotConvertible, int>,
+                                     std::ranges::in_in_result<int, int>>);
+static_assert(!std::is_convertible_v<std::ranges::in_in_result<int, NotConvertible>,
+                                     std::ranges::in_in_result<int, int>>);
+
 constexpr bool test() {
   {
     std::ranges::in_in_result<int, double> res{10L, 0.};


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117517.400926.patch
Type: text/x-patch
Size: 1015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220118/bee0bce2/attachment-0001.bin>


More information about the libcxx-commits mailing list