[libcxx-commits] [libcxx] [libc++] Adds a global private constructor tag. (PR #87920)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 9 09:47:19 PDT 2024


================
@@ -0,0 +1,20 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+// struct __private_constructor_tag {};
+
+// The private constructor tag is intended to be a trivial type that can easily
----------------
ldionne wrote:

I am not certain this test is something we want to uphold going forward. It is possible that we'd want to use `__private_constructor_tag` in something that is defined in `<utility>`, and then this test would start failing arbitrarily. So IMO we should just remove the test -- the fact that we use a reserved identifier should be enough to discourage users from using it.

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


More information about the libcxx-commits mailing list