[libc++][NFC] Add missing synopsis for node handles

This was manually taken from https://llvm.org/D100311.
This commit is contained in:
Louis Dionne 2021-09-07 15:25:41 -04:00
parent cfe0284749
commit 08d56432ad

View file

@ -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>