#if __cplusplus >= 201103L
#define __cpp_lib_allocator_traits_is_always_equal 201411
+ /// @cond undocumented
struct __allocator_traits_base
{
template<typename _Tp, typename _Up, typename = void>
template<typename _Alloc, typename _Up>
using __alloc_rebind
= typename __allocator_traits_base::template __rebind<_Alloc, _Up>::type;
+ /// @endcond
/**
* @brief Uniform interface to all allocator types.
+ * @headerfile memory
* @ingroup allocators
+ * @since C++11
*/
template<typename _Alloc>
struct allocator_traits : __allocator_traits_base
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+/// @cond undocumented
/// Non-standard RAII type for managing pointers obtained from allocators.
template<typename _Alloc>
return { __a, std::allocator_traits<_Alloc>::allocate(__a, 1) };
}
+/// @endcond
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+/// @cond undocumented
struct _Enable_default_constructor_tag
{
operator=(_Enable_copy_move&&) noexcept = delete;
};
+/// @endcond
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+/// @cond undocumented
template<typename _Tp, typename _Hash>
using __cache_default
= __enable_if_t<!__or_<is_integral<_Hash>, __is_allocator<_Hash>>::value>;
#endif
+/// @endcond
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+/// @cond undocumented
template<typename _Key, typename _Value, typename _Alloc,
typename _ExtractKey, typename _Equal,
///@} hashtable-detail
} // namespace __detail
+/// @endcond
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+ /**
+ * @defgroup node_handles Node handles
+ * @ingroup associative_containers
+ * @since C++17
+ *
+ * The associative containers (`map`, `set`, `multimap` and `multiset`)
+ * support extracting and re-inserting nodes from the container. Those
+ * operations use the container's `node_handle` type, which is an alias
+ * for a `_Node_handle<...>` type. You should always use the container's
+ * `node_handle` type (e.g. `std::set<int>::node_handle`) to refer to
+ * these types, not the non-standard internal `_Node_handle` names.
+ *
+ * @{
+ */
+
/// Base class for node handle types of maps and sets.
template<typename _Val, typename _NodeAlloc>
class _Node_handle_common
[[nodiscard]] bool empty() const noexcept { return _M_ptr == nullptr; }
+ /// @cond undocumented
protected:
constexpr _Node_handle_common() noexcept : _M_ptr() { }
template<typename _Key2, typename _Value2, typename _KeyOfValue,
typename _Compare, typename _ValueAlloc>
friend class _Rb_tree;
+
+ /// @endcond
};
/// Node handle type for maps.
_NodeHandle node;
};
+ /// @}
+
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
+/// @cond undocumented
// This is used for std::experimental::erased_type from Library Fundamentals.
struct __erased_type { };
std::forward<_Args>(__args)...);
}
+/// @endcond
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
/**
* @brief A type-safe container of any type.
*
- * An @c any object's state is either empty or it stores a contained object
+ * An `any` object's state is either empty or it stores a contained object
* of CopyConstructible type.
+ *
+ * @since C++17
*/
class any
{
}
#endif
+ /// @cond undocumented
template<typename _Tp>
static constexpr bool __is_valid_cast()
{ return __or_<is_reference<_Tp>, is_copy_constructible<_Tp>>::value; }
+ /// @endcond
private:
enum _Op {
void (*_M_manager)(_Op, const any*, _Arg*);
_Storage _M_storage;
+ /// @cond undocumented
template<typename _Tp>
friend void* __any_caster(const any* __any);
+ /// @endcond
// Manage in-place contained object.
template<typename _Tp>