[libcxx-commits] [libcxx] [libc++][ranges] LWG4013: Make lazy_split_view::outer-iterator::value_type non-default-constructible (PR #221919)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 8 06:09:48 PDT 2026
================
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// LWG 4013: lazy_split_view::outer-iterator::value_type should not provide a default constructor
+
+#include <ranges>
+#include <type_traits>
+
+#include "../types.h"
+
+// outer-iterator::value_type should not be default-constructible (LWG 4013).
+static_assert(!std::is_default_constructible_v<ValueTypeForward>);
+static_assert(!std::is_default_constructible_v<ValueTypeInput>);
+
+// outer-iterator::value_type constructor from outer-iterator is private / not constructible by users (LWG 4013).
+static_assert(!std::is_constructible_v<ValueTypeForward, OuterIterForward>);
+static_assert(!std::is_constructible_v<ValueTypeInput, OuterIterInput>);
----------------
Zingam wrote:
I saw a clang-format error about the missing end line. There isn't one here though.
https://github.com/llvm/llvm-project/pull/221919
More information about the libcxx-commits
mailing list