[libcxx-commits] [libcxx] [libc++] Add tombstone traits to use in optional, variant (PR #98498)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 11 09:31:53 PDT 2024
================
@@ -0,0 +1,171 @@
+//===----------------------------------------------------------------------===//
+//
+// 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_DISENGAGED_TRAITS_H
+#define _LIBCPP___TYPE_TRAITS_DISENGAGED_TRAITS_H
+
+#include <__config>
+#include <__memory/construct_at.h>
+#include <__type_traits/datasizeof.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/is_constant_evaluated.h>
+#include <__type_traits/is_fundamental.h>
+#include <__type_traits/is_trivially_destructible.h>
+#include <__type_traits/void_t.h>
+#include <__utility/forward_like.h>
+#include <__utility/in_place.h>
+#include <__utility/piecewise_construct.h>
+#include <__utility/pointer_int_pair.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <class>
+struct __tombstone_memory_layout;
----------------
ldionne wrote:
Since this is the class that we intend types to specialize, this should actually be named `__tombstone_traits`. It's a bit like `iterator_traits` or `__segmented_iterator_traits`.
We can find another name for the current `__tombstone_traits` class.
https://github.com/llvm/llvm-project/pull/98498
More information about the libcxx-commits
mailing list