chromium/third_party/libc++/src/include/list

// -*- 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_LIST
#define _LIBCPP_LIST

/*
    list synopsis

namespace std
{

template <class T, class Alloc = allocator<T> >
class list
{
public:

    // types:
    typedef T value_type;
    typedef Alloc allocator_type;
    typedef typename allocator_type::reference reference;
    typedef typename allocator_type::const_reference const_reference;
    typedef typename allocator_type::pointer pointer;
    typedef typename allocator_type::const_pointer const_pointer;
    typedef implementation-defined iterator;
    typedef implementation-defined const_iterator;
    typedef implementation-defined size_type;
    typedef implementation-defined difference_type;
    typedef reverse_iterator<iterator> reverse_iterator;
    typedef reverse_iterator<const_iterator> const_reverse_iterator;

    list()
        noexcept(is_nothrow_default_constructible<allocator_type>::value);
    explicit list(const allocator_type& a);
    explicit list(size_type n);
    explicit list(size_type n, const allocator_type& a); // C++14
    list(size_type n, const value_type& value);
    list(size_type n, const value_type& value, const allocator_type& a);
    template <class Iter>
        list(Iter first, Iter last);
    template <class Iter>
        list(Iter first, Iter last, const allocator_type& a);
    template<container-compatible-range<T> R>
      list(from_range_t, R&& rg, const Allocator& = Allocator()); // C++23
    list(const list& x);
    list(const list&, const allocator_type& a);
    list(list&& x)
        noexcept(is_nothrow_move_constructible<allocator_type>::value);
    list(list&&, const allocator_type& a);
    list(initializer_list<value_type>);
    list(initializer_list<value_type>, const allocator_type& a);

    ~list();

    list& operator=(const list& x);
    list& operator=(list&& x)
        noexcept(
             allocator_type::propagate_on_container_move_assignment::value &&
             is_nothrow_move_assignable<allocator_type>::value);
    list& operator=(initializer_list<value_type>);
    template <class Iter>
        void assign(Iter first, Iter last);
    template<container-compatible-range<T> R>
      void assign_range(R&& rg); // C++23
    void assign(size_type n, const value_type& t);
    void assign(initializer_list<value_type>);

    allocator_type get_allocator() const noexcept;

    iterator begin() noexcept;
    const_iterator begin() const noexcept;
    iterator end() noexcept;
    const_iterator end() const noexcept;
    reverse_iterator rbegin() noexcept;
    const_reverse_iterator rbegin() const noexcept;
    reverse_iterator rend() noexcept;
    const_reverse_iterator rend() const noexcept;
    const_iterator cbegin() const noexcept;
    const_iterator cend() const noexcept;
    const_reverse_iterator crbegin() const noexcept;
    const_reverse_iterator crend() const noexcept;

    reference front();
    const_reference front() const;
    reference back();
    const_reference back() const;

    bool empty() const noexcept;
    size_type size() const noexcept;
    size_type max_size() const noexcept;

    template <class... Args>
        reference emplace_front(Args&&... args); // reference in C++17
    void pop_front();
    template <class... Args>
        reference emplace_back(Args&&... args);  // reference in C++17
    void pop_back();
    void push_front(const value_type& x);
    void push_front(value_type&& x);
    template<container-compatible-range<T> R>
      void prepend_range(R&& rg); // C++23
    void push_back(const value_type& x);
    void push_back(value_type&& x);
    template<container-compatible-range<T> R>
      void append_range(R&& rg); // C++23
    template <class... Args>
        iterator emplace(const_iterator position, Args&&... args);
    iterator insert(const_iterator position, const value_type& x);
    iterator insert(const_iterator position, value_type&& x);
    iterator insert(const_iterator position, size_type n, const value_type& x);
    template <class Iter>
        iterator insert(const_iterator position, Iter first, Iter last);
    template<container-compatible-range<T> R>
      iterator insert_range(const_iterator position, R&& rg); // C++23
    iterator insert(const_iterator position, initializer_list<value_type> il);

    iterator erase(const_iterator position);
    iterator erase(const_iterator position, const_iterator last);

    void resize(size_type sz);
    void resize(size_type sz, const value_type& c);

    void swap(list&)
        noexcept(allocator_traits<allocator_type>::is_always_equal::value);  // C++17
    void clear() noexcept;

    void splice(const_iterator position, list& x);
    void splice(const_iterator position, list&& x);
    void splice(const_iterator position, list& x, const_iterator i);
    void splice(const_iterator position, list&& x, const_iterator i);
    void splice(const_iterator position, list& x, const_iterator first,
                                                  const_iterator last);
    void splice(const_iterator position, list&& x, const_iterator first,
                                                  const_iterator last);

    size_type remove(const value_type& value);       // void before C++20
    template <class Pred>
      size_type remove_if(Pred pred);                // void before C++20
    size_type unique();                              // void before C++20
    template <class BinaryPredicate>
      size_type unique(BinaryPredicate binary_pred); // void before C++20
    void merge(list& x);
    void merge(list&& x);
    template <class Compare>
        void merge(list& x, Compare comp);
    template <class Compare>
        void merge(list&& x, Compare comp);
    void sort();
    template <class Compare>
        void sort(Compare comp);
    void reverse() noexcept;
};


template <class InputIterator, class Allocator = allocator<typename iterator_traits<InputIterator>::value_type>>
    list(InputIterator, InputIterator, Allocator = Allocator())
    -> list<typename iterator_traits<InputIterator>::value_type, Allocator>;  // C++17

template<ranges::input_range R, class Allocator = allocator<ranges::range_value_t<R>>>
  list(from_range_t, R&&, Allocator = Allocator())
    -> list<ranges::range_value_t<R>, Allocator>; // C++23

template <class T, class Alloc>
    bool operator==(const list<T,Alloc>& x, const list<T,Alloc>& y);
template <class T, class Alloc>
    bool operator< (const list<T,Alloc>& x, const list<T,Alloc>& y);     // removed in C++20
template <class T, class Alloc>
    bool operator!=(const list<T,Alloc>& x, const list<T,Alloc>& y);     // removed in C++20
template <class T, class Alloc>
    bool operator> (const list<T,Alloc>& x, const list<T,Alloc>& y);     // removed in C++20
template <class T, class Alloc>
    bool operator>=(const list<T,Alloc>& x, const list<T,Alloc>& y);     // removed in C++20
template <class T, class Alloc>
    bool operator<=(const list<T,Alloc>& x, const list<T,Alloc>& y);     // removed in C++20
template<class T, class Allocator>
  synth-three-way-result<T> operator<=>(const list<T, Allocator>& x,
                                        const list<T, Allocator>& y);    // since C++20

template <class T, class Alloc>
    void swap(list<T,Alloc>& x, list<T,Alloc>& y)
         noexcept(noexcept(x.swap(y)));

template <class T, class Allocator, class U>
    typename list<T, Allocator>::size_type
    erase(list<T, Allocator>& c, const U& value);       // since C++20
template <class T, class Allocator, class Predicate>
    typename list<T, Allocator>::size_type
    erase_if(list<T, Allocator>& c, Predicate pred);    // since C++20

}  // std

*/

#include <__algorithm/comp.h>
#include <__algorithm/equal.h>
#include <__algorithm/lexicographical_compare.h>
#include <__algorithm/lexicographical_compare_three_way.h>
#include <__algorithm/min.h>
#include <__assert>
#include <__config>
#include <__format/enable_insertable.h>
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/move_iterator.h>
#include <__iterator/next.h>
#include <__iterator/prev.h>
#include <__iterator/reverse_iterator.h>
#include <__memory/addressof.h>
#include <__memory/allocation_guard.h>
#include <__memory/allocator.h>
#include <__memory/allocator_traits.h>
#include <__memory/compressed_pair.h>
#include <__memory/construct_at.h>
#include <__memory/pointer_traits.h>
#include <__memory/swap_allocator.h>
#include <__memory_resource/polymorphic_allocator.h>
#include <__ranges/access.h>
#include <__ranges/concepts.h>
#include <__ranges/container_compatible_range.h>
#include <__ranges/from_range.h>
#include <__type_traits/conditional.h>
#include <__type_traits/is_allocator.h>
#include <__type_traits/is_nothrow_assignable.h>
#include <__type_traits/is_nothrow_constructible.h>
#include <__type_traits/is_pointer.h>
#include <__type_traits/is_same.h>
#include <__type_traits/type_identity.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/swap.h>
#include <cstring>
#include <limits>
#include <new> // __launder
#include <version>

// standard-mandated includes

// [iterator.range]
#include <__iterator/access.h>
#include <__iterator/data.h>
#include <__iterator/empty.h>
#include <__iterator/reverse_access.h>
#include <__iterator/size.h>

// [list.syn]
#include <compare>
#include <initializer_list>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#  pragma GCC system_header
#endif

_LIBCPP_PUSH_MACROS
#include <__undef_macros>

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _Tp, class _VoidPtr>
struct __list_node;
template <class _Tp, class _VoidPtr>
struct __list_node_base;

template <class _Tp, class _VoidPtr>
struct __list_node_pointer_traits {};

template <class _Tp, class _VoidPtr>
struct __list_node_base {};

template <class _Tp, class _VoidPtr>
struct __list_node : public __list_node_base<_Tp, _VoidPtr> {};

template <class _Tp, class _Alloc = allocator<_Tp> >
class _LIBCPP_TEMPLATE_VIS list;
template <class _Tp, class _Alloc>
class __list_imp;
template <class _Tp, class _VoidPtr>
class _LIBCPP_TEMPLATE_VIS __list_const_iterator;

template <class _Tp, class _VoidPtr>
class _LIBCPP_TEMPLATE_VIS __list_iterator {};

template <class _Tp, class _VoidPtr>
class _LIBCPP_TEMPLATE_VIS __list_const_iterator {};

template <class _Tp, class _Alloc>
class __list_imp {};

// Unlink nodes [__f, __l]
template <class _Tp, class _Alloc>
inline void __list_imp<_Tp, _Alloc>::__unlink_nodes(__link_pointer __f, __link_pointer __l) _NOEXCEPT {}

template <class _Tp, class _Alloc>
inline __list_imp<_Tp, _Alloc>::__list_imp() _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value)
    :{}

template <class _Tp, class _Alloc>
inline __list_imp<_Tp, _Alloc>::__list_imp(const allocator_type& __a) :{}

template <class _Tp, class _Alloc>
inline __list_imp<_Tp, _Alloc>::__list_imp(const __node_allocator& __a) :{}

#ifndef _LIBCPP_CXX03_LANG
template <class _Tp, class _Alloc>
inline __list_imp<_Tp, _Alloc>::__list_imp(__node_allocator&& __a) _NOEXCEPT :{}
#endif

template <class _Tp, class _Alloc>
__list_imp<_Tp, _Alloc>::~__list_imp() {}

template <class _Tp, class _Alloc>
void __list_imp<_Tp, _Alloc>::clear() _NOEXCEPT {}

template <class _Tp, class _Alloc>
void __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
#if _LIBCPP_STD_VER >= 14
    _NOEXCEPT
#else
    _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value || __is_nothrow_swappable_v<allocator_type>)
#endif
{}

template <class _Tp, class _Alloc /*= allocator<_Tp>*/>
class _LIBCPP_TEMPLATE_VIS list : private __list_imp<_Tp, _Alloc> {};

#if _LIBCPP_STD_VER >= 17
template <class _InputIterator,
          class _Alloc = allocator<__iter_value_type<_InputIterator>>,
          class        = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
          class        = enable_if_t<__is_allocator<_Alloc>::value> >
list(_InputIterator, _InputIterator) -> list<__iter_value_type<_InputIterator>, _Alloc>;

template <class _InputIterator,
          class _Alloc,
          class = enable_if_t<__has_input_iterator_category<_InputIterator>::value>,
          class = enable_if_t<__is_allocator<_Alloc>::value> >
list(_InputIterator, _InputIterator, _Alloc) -> list<__iter_value_type<_InputIterator>, _Alloc>;
#endif

#if _LIBCPP_STD_VER >= 23
template <ranges::input_range _Range,
          class _Alloc = allocator<ranges::range_value_t<_Range>>,
          class        = enable_if_t<__is_allocator<_Alloc>::value> >
list(from_range_t, _Range&&, _Alloc = _Alloc()) -> list<ranges::range_value_t<_Range>, _Alloc>;
#endif

// Link in nodes [__f, __l] just prior to __p
template <class _Tp, class _Alloc>
inline void list<_Tp, _Alloc>::__link_nodes(__link_pointer __p, __link_pointer __f, __link_pointer __l) {}

// Link in nodes [__f, __l] at the front of the list
template <class _Tp, class _Alloc>
inline void list<_Tp, _Alloc>::__link_nodes_at_front(__link_pointer __f, __link_pointer __l) {}

// Link in nodes [__f, __l] at the back of the list
template <class _Tp, class _Alloc>
inline void list<_Tp, _Alloc>::__link_nodes_at_back(__link_pointer __f, __link_pointer __l) {}

template <class _Tp, class _Alloc>
inline typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::__iterator(size_type __n) {}

template <class _Tp, class _Alloc>
list<_Tp, _Alloc>::list(size_type __n) {}

#if _LIBCPP_STD_VER >= 14
template <class _Tp, class _Alloc>
list<_Tp, _Alloc>::list(size_type __n, const allocator_type& __a) :{}
#endif

template <class _Tp, class _Alloc>
list<_Tp, _Alloc>::list(size_type __n, const value_type& __x) {}

template <class _Tp, class _Alloc>
template <class _InpIter, __enable_if_t<__has_input_iterator_category<_InpIter>::value, int> >
list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l) {}

template <class _Tp, class _Alloc>
template <class _InpIter, __enable_if_t<__has_input_iterator_category<_InpIter>::value, int> >
list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, const allocator_type& __a) : base(__a) {}

template <class _Tp, class _Alloc>
list<_Tp, _Alloc>::list(const list& __c)
    :{}

template <class _Tp, class _Alloc>
list<_Tp, _Alloc>::list(const list& __c, const __type_identity_t<allocator_type>& __a) :{}

#ifndef _LIBCPP_CXX03_LANG

template <class _Tp, class _Alloc>
list<_Tp, _Alloc>::list(initializer_list<value_type> __il, const allocator_type& __a) :{}

template <class _Tp, class _Alloc>
list<_Tp, _Alloc>::list(initializer_list<value_type> __il) {}

template <class _Tp, class _Alloc>
inline list<_Tp, _Alloc>::list(list&& __c) noexcept(is_nothrow_move_constructible<__node_allocator>::value)
    :{}

template <class _Tp, class _Alloc>
inline list<_Tp, _Alloc>::list(list&& __c, const __type_identity_t<allocator_type>& __a) :{}

template <class _Tp, class _Alloc>
inline list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(list&& __c) noexcept(
    __node_alloc_traits::propagate_on_container_move_assignment::value &&
    is_nothrow_move_assignable<__node_allocator>::value) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::__move_assign(list& __c, false_type) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::__move_assign(list& __c,
                                      true_type) noexcept(is_nothrow_move_assignable<__node_allocator>::value) {}

#endif // _LIBCPP_CXX03_LANG

template <class _Tp, class _Alloc>
inline list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(const list& __c) {}

template <class _Tp, class _Alloc>
template <class _InpIter, __enable_if_t<__has_input_iterator_category<_InpIter>::value, int> >
void list<_Tp, _Alloc>::assign(_InpIter __f, _InpIter __l) {}

template <class _Tp, class _Alloc>
template <class _Iterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI void list<_Tp, _Alloc>::__assign_with_sentinel(_Iterator __f, _Sentinel __l) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::assign(size_type __n, const value_type& __x) {}

template <class _Tp, class _Alloc>
inline _Alloc list<_Tp, _Alloc>::get_allocator() const _NOEXCEPT {}

template <class _Tp, class _Alloc>
typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, const value_type& __x) {}

template <class _Tp, class _Alloc>
typename list<_Tp, _Alloc>::iterator
list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& __x) {}

template <class _Tp, class _Alloc>
template <class _InpIter, __enable_if_t<__has_input_iterator_category<_InpIter>::value, int> >
typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l) {}

template <class _Tp, class _Alloc>
template <class _Iterator, class _Sentinel>
_LIBCPP_HIDE_FROM_ABI typename list<_Tp, _Alloc>::iterator
list<_Tp, _Alloc>::__insert_with_sentinel(const_iterator __p, _Iterator __f, _Sentinel __l) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::push_front(const value_type& __x) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::push_back(const value_type& __x) {}

#ifndef _LIBCPP_CXX03_LANG

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::push_front(value_type&& __x) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::push_back(value_type&& __x) {}

template <class _Tp, class _Alloc>
template <class... _Args>
#  if _LIBCPP_STD_VER >= 17
typename list<_Tp, _Alloc>::reference
#  else
void
#  endif
list<_Tp, _Alloc>::emplace_front(_Args&&... __args) {}

template <class _Tp, class _Alloc>
template <class... _Args>
#  if _LIBCPP_STD_VER >= 17
typename list<_Tp, _Alloc>::reference
#  else
void
#  endif
list<_Tp, _Alloc>::emplace_back(_Args&&... __args) {}

template <class _Tp, class _Alloc>
template <class... _Args>
typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args) {}

template <class _Tp, class _Alloc>
typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x) {}

#endif // _LIBCPP_CXX03_LANG

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::pop_front() {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::pop_back() {}

template <class _Tp, class _Alloc>
typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __p) {}

template <class _Tp, class _Alloc>
typename list<_Tp, _Alloc>::iterator list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::resize(size_type __n) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l) {}

template <class _Tp, class _Alloc>
typename list<_Tp, _Alloc>::__remove_return_type list<_Tp, _Alloc>::remove(const value_type& __x) {}

template <class _Tp, class _Alloc>
template <class _Pred>
typename list<_Tp, _Alloc>::__remove_return_type list<_Tp, _Alloc>::remove_if(_Pred __pred) {}

template <class _Tp, class _Alloc>
template <class _BinaryPred>
typename list<_Tp, _Alloc>::__remove_return_type list<_Tp, _Alloc>::unique(_BinaryPred __binary_pred) {}

template <class _Tp, class _Alloc>
inline void list<_Tp, _Alloc>::merge(list& __c) {}

template <class _Tp, class _Alloc>
template <class _Comp>
void list<_Tp, _Alloc>::merge(list& __c, _Comp __comp) {}

template <class _Tp, class _Alloc>
inline void list<_Tp, _Alloc>::sort() {}

template <class _Tp, class _Alloc>
template <class _Comp>
inline void list<_Tp, _Alloc>::sort(_Comp __comp) {}

template <class _Tp, class _Alloc>
template <class _Comp>
typename list<_Tp, _Alloc>::iterator
list<_Tp, _Alloc>::__sort(iterator __f1, iterator __e2, size_type __n, _Comp& __comp) {}

template <class _Tp, class _Alloc>
void list<_Tp, _Alloc>::reverse() _NOEXCEPT {}

template <class _Tp, class _Alloc>
bool list<_Tp, _Alloc>::__invariants() const {}

template <class _Tp, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI bool operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) {}

#if _LIBCPP_STD_VER <= 17

template <class _Tp, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI bool operator<(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) {
  return std::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
}

template <class _Tp, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) {
  return !(__x == __y);
}

template <class _Tp, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI bool operator>(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) {
  return __y < __x;
}

template <class _Tp, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI bool operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) {
  return !(__x < __y);
}

template <class _Tp, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI bool operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) {
  return !(__y < __x);
}

#else // _LIBCPP_STD_VER <= 17

template <class _Tp, class _Allocator>
_LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Tp>
operator<=>(const list<_Tp, _Allocator>& __x, const list<_Tp, _Allocator>& __y) {}

#endif // _LIBCPP_STD_VER <= 17

template <class _Tp, class _Alloc>
inline _LIBCPP_HIDE_FROM_ABI void swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
    _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) {}

#if _LIBCPP_STD_VER >= 20
template <class _Tp, class _Allocator, class _Predicate>
inline _LIBCPP_HIDE_FROM_ABI typename list<_Tp, _Allocator>::size_type
erase_if(list<_Tp, _Allocator>& __c, _Predicate __pred) {}

template <class _Tp, class _Allocator, class _Up>
inline _LIBCPP_HIDE_FROM_ABI typename list<_Tp, _Allocator>::size_type
erase(list<_Tp, _Allocator>& __c, const _Up& __v) {}

__enable_insertable;
#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
__enable_insertable;
#  endif

#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

#if _LIBCPP_STD_VER >= 17
_LIBCPP_BEGIN_NAMESPACE_STD
namespace pmr {
list;
} // namespace pmr
_LIBCPP_END_NAMESPACE_STD
#endif

_LIBCPP_POP_MACROS

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
#  include <algorithm>
#  include <atomic>
#  include <concepts>
#  include <cstdint>
#  include <cstdlib>
#  include <functional>
#  include <iosfwd>
#  include <iterator>
#  include <stdexcept>
#  include <type_traits>
#  include <typeinfo>
#endif

#endif // _LIBCPP_LIST