[libcxx-commits] [libcxx] [libcxx] Implement `std::constant_wrapper` (PR #191695)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 13 08:41:39 PDT 2026


================
@@ -0,0 +1,90 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+
+// constant_wrapper
+
+// constexpr operator decltype(auto)() const noexcept { return value; }
----------------
frederick-vs-ja wrote:

```suggestion
// constexpr operator decltype(value)() const noexcept { return value; }
```

https://github.com/llvm/llvm-project/pull/191695


More information about the libcxx-commits mailing list