[libcxx-commits] [libcxx] [libc++] Implement P0843R14: `inplace_vector` (PR #204008)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 23 12:49:02 PDT 2026
================
@@ -0,0 +1,37 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: std-at-least-c++26
+
+// <inplace_vector>
+
+// constexpr bool empty() const noexcept;
+
+#include <cassert>
+#include <inplace_vector>
+
+#include "test_macros.h"
+
+constexpr bool test() {
+ std::inplace_vector<int, 4> c;
----------------
ldionne wrote:
As-is, the test passes even if the function isn't `const`. Should fix this by calling it on a `const` object.
https://github.com/llvm/llvm-project/pull/204008
More information about the libcxx-commits
mailing list