[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
Mon Jan 17 15:21:30 PST 2022
philnik created this revision.
philnik added reviewers: Quuxplusone, ldionne, Mordante.
philnik requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Currently it is not checked that operator in_in_result<II1, II2>() SFINAEs away properly
Repository:
rG LLVM Github Monorepo
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.400655.patch
Type: text/x-patch
Size: 1015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220117/c7e0d407/attachment.bin>
More information about the libcxx-commits
mailing list