[libcxx-commits] [libcxx] [libc++][ranges] add static_assert for ranges::to (PR #135802)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 20 23:59:06 PDT 2025
================
@@ -0,0 +1,72 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
+
+// Test that the "mandates" requirements on the given class are checked using `static_assert`.
+#include <ranges>
+void ff() {}
----------------
frederick-vs-ja wrote:
As all we want are `static_assert` failures, perhaps it's better to remove function bodies. Ditto `C` & `R`'s member functions.
https://github.com/llvm/llvm-project/pull/135802
More information about the libcxx-commits
mailing list