[libcxx-commits] [libcxx] [libc++] Add container_traits (prework for `std::flat_map`) (PR #109578)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Sep 28 05:54:11 PDT 2024
================
@@ -0,0 +1,28 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// 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___TYPE_TRAITS_CONTAINER_TRAITS_H
+#define _LIBCPP___TYPE_TRAITS_CONTAINER_TRAITS_H
+
+#include <__config>
+#include <__type_traits/integral_constant.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class _Tp>
+struct __container_traits {
+ using __emplacement_has_strong_exception_safety_guarantee = false_type;
----------------
huixie90 wrote:
> Why is this a `bool_constant`? Is it expected to be used in `_And`/`_Or`?
`bool_constant` definitely works in C++03 and others I am not too sure. as Louis pointed out, we can potentially use
```
static _LIBCPP_CONSTEXPR const
```
in c++ 03 mode
https://github.com/llvm/llvm-project/pull/109578
More information about the libcxx-commits
mailing list