[libcxx-commits] [libcxx] [libc++][spaceship] P2404R3: Move-only types for equality_comparable_with, totally_ordered_with, and three_way_comparable_with (PR #99420)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 18 07:09:59 PDT 2024


================
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// 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___CONCEPTS_COMPARISON_COMMON_TYPE_H
+#define _LIBCPP___CONCEPTS_COMPARISON_COMMON_TYPE_H
+
+#include "__concepts/convertible_to.h"
+#include "__concepts/same_as.h"
+#include "__config"
+#include "__type_traits/common_reference.h"
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#  pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER >= 23
+
+template <class _Tp, class _Up, class _C = common_reference_t<const _Tp&, const _Up&>>
----------------
Zingam wrote:

```suggestion
template <class _Tp, class _Up, class _Cp = common_reference_t<const _Tp&, const _Up&>>
```

I wonder if we need to have the `p` letter for consistency too. 

BTW AFAIK the latest tendency is to prefer human readable names sometimes.

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


More information about the libcxx-commits mailing list