[libcxx-commits] [libcxx] 6322cb4 - [libc++][test] test in_in_result convertible requirements
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 18 11:31:27 PST 2022
Author: Nikolas Klauser
Date: 2022-01-18T20:29:51+01:00
New Revision: 6322cb4890dbb3b006820622520685729c7012f2
URL: https://github.com/llvm/llvm-project/commit/6322cb4890dbb3b006820622520685729c7012f2
DIFF: https://github.com/llvm/llvm-project/commit/6322cb4890dbb3b006820622520685729c7012f2.diff
LOG: [libc++][test] test in_in_result convertible requirements
Currently it is not checked that operator in_in_result<II1, II2>() SFINAEs away properly
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D117517
Added:
Modified:
libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
index 72834be60a8bd..fbb6da6340ff8 100644
--- a/libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
+++ b/libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
@@ -54,6 +54,12 @@ static_assert(!std::is_nothrow_convertible_v<std::ranges::in_in_result<int, int>
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.};
More information about the libcxx-commits
mailing list