[libcxx-commits] [libcxx] 08d5643 - [libc++][NFC] Add missing synopsis for node handles
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 7 12:26:42 PDT 2021
Author: Louis Dionne
Date: 2021-09-07T15:26:33-04:00
New Revision: 08d56432ad8cea452a03ffd9b69faf642cf1901c
URL: https://github.com/llvm/llvm-project/commit/08d56432ad8cea452a03ffd9b69faf642cf1901c
DIFF: https://github.com/llvm/llvm-project/commit/08d56432ad8cea452a03ffd9b69faf642cf1901c.diff
LOG: [libc++][NFC] Add missing synopsis for node handles
This was manually taken from https://llvm.org/D100311.
Added:
Modified:
libcxx/include/__node_handle
Removed:
################################################################################
diff --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle
index 1e73ec825bb5..f313409bb682 100644
--- a/libcxx/include/__node_handle
+++ b/libcxx/include/__node_handle
@@ -10,6 +10,54 @@
#ifndef _LIBCPP___NODE_HANDLE
#define _LIBCPP___NODE_HANDLE
+/*
+
+template<unspecified>
+class node-handle {
+public:
+ using value_type = see below; // not present for map containers
+ using key_type = see below; // not present for set containers
+ using mapped_type = see below; // not present for set containers
+ using allocator_type = see below;
+
+private:
+ using container_node_type = unspecified; // exposition only
+ using ator_traits = allocator_traits<allocator_type>; // exposition only
+
+ typename ator_traits::template
+ rebind_traits<container_node_type>::pointer ptr_; // exposition only
+ optional<allocator_type> alloc_; // exposition only
+
+public:
+ // [container.node.cons], constructors, copy, and assignment
+ constexpr node-handle() noexcept : ptr_(), alloc_() {}
+ node-handle(node-handle&&) noexcept;
+ node-handle& operator=(node-handle&&);
+
+ // [container.node.dtor], destructor
+ ~node-handle();
+
+ // [container.node.observers], observers
+ value_type& value() const; // not present for map containers
+ key_type& key() const; // not present for set containers
+ mapped_type& mapped() const; // not present for set containers
+
+ allocator_type get_allocator() const;
+ explicit operator bool() const noexcept;
+ [[nodiscard]] bool empty() const noexcept; // nodiscard since C++20
+
+ // [container.node.modifiers], modifiers
+ void swap(node-handle&)
+ noexcept(ator_traits::propagate_on_container_swap::value ||
+ ator_traits::is_always_equal::value);
+
+ friend void swap(node-handle& x, node-handle& y) noexcept(noexcept(x.swap(y))) {
+ x.swap(y);
+ }
+};
+
+*/
+
#include <__config>
#include <__debug>
#include <memory>
More information about the libcxx-commits
mailing list