[libcxx-commits] [libcxx] [libc++][RFC] Rewrite CPOs with resolver functions (PR #209104)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 30 04:45:36 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef _LIBCPP___UTILITY_CPO_H
+#define _LIBCPP___UTILITY_CPO_H
+
+#include <__config>
+#include <__utility/forward.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER >= 20
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <auto __resolver>
+struct _CPO {
----------------
ldionne wrote:
Let's document what this beautiful class does. It's the first time I see this pattern and I think it's absolutely brilliant. This basically resolves concerns around expression-equivalence IIUC.
https://github.com/llvm/llvm-project/pull/209104
More information about the libcxx-commits
mailing list