[libcxx-commits] [libcxx] [libc++] Flat containers should reject `vector<bool, Alloc>` (PR #224886)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Sep 19 23:58:53 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___VECTOR_IS_VECTOR_H
+#define _LIBCPP___VECTOR_IS_VECTOR_H
+
+#include <__config>
+#include <__fwd/vector.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp>
+struct __is_vectorbool : false_type {};
+
+template <class _Allocator>
+struct __is_vectorbool<vector<bool, _Allocator>> : true_type {};
----------------
frederick-vs-ja wrote:
These are meaningless since supported compilers provided `inline` variables and variable templates in old modes as extensions. Please just provide variable template(s).
https://github.com/llvm/llvm-project/pull/224886
More information about the libcxx-commits
mailing list