0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

24.4 Associative containers [associative]C++N4910:2022 (640) p906.cpp

Last updated at Posted at 2022-08-06

はじめに(Introduction)

N4910 Working Draft, Standard for Programming Language C++
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf

n4910は、ISO/IEC JTC1 SC22 WG21の作業原案(Working Draft)です。
公式のISO/IEC 14882原本ではありません。
ISO/IEC JTC1 SC22 WG21では、可能な限り作業文書を公開し、幅広い意見を求めています。
一連の記事はコード断片をコンパイルできる形にする方法を検討してコンパイル、リンク、実行して、規格案の原文と処理系(g++, Clang++)との違いを確認し、技術内容を検討し、ISO/IEC JTC1 SC22 WG21にフィードバックするために用います。
また、CERT C++, MISRA C++等のコーディング標準のコード断片をコンパイルする際の参考にさせていただこうと考えています。CERT C++, MISRA C++が標準化の動きとの時間的なずれがあれば確認できれば幸いです。また、boostライブラリとの関連、Linux OS, TOPPERSカーネル、g++(GCC), clang++(LLVM)との関係も調査中です。
何か、抜け漏れ、耳より情報がありましたらおしらせくださると幸いです。

<この項は書きかけです。順次追記します。>

背景(back ground)

C/C++でコンパイルエラーが出ると、途方にくれることがしばしばあります。
何回かに1回は、該当するエラーが検索できます。
ただ、条件が違っていて、そこでの修正方法では目的を達成しないこともしばしばです。いろいろな条件のコンパイルエラーとその対応方法について、広く記録することによって、いつか同じエラーに遭遇した時にやくに立つことを目指しています。

この半年の間で、三度、自分のネットでの記録に助けられたことがあります。
また過去に解決できなかった記録を10種類以上、最近になって解決できたことがあります。それは、主に次の3つの情報に基づいています。

cpprefjp - C++日本語リファレンス

コンパイラの実装状況

また
https://researchmap.jp/joub9b3my-1797580/#_1797580
に記載したサイトのお世話になっています。

作業方針(sequence)

Clang++では-std=c++03, C++2bの2種類
g++では-std=c++03, c++2bの2種類
でコンパイルし、

1)コンパイルエラーを収集する。
2)コンパイルエラーをなくす方法を検討する。
コンパイルエラーになる例を示すだけが目的のコードは、コンパイルエラーをなくすのではなく、コンパイルエラーの種類を収集するだけにする。
文法を示すのが目的のコード場合に、コンパイルエラーをなくすのに手間がかかる場合は、順次作業します。
3)リンクエラーをなくす方法を検討する。
文法を示すのが目的のコード場合に、リンクエラーをなくすのに手間がかかる場合は、順次作業します。
4)意味のある出力を作る。
コンパイル、リンクが通っても、意味のある出力を示そうとすると、コンパイル・リンクエラーが出て収拾できそうにない場合がある。順次作業します。

1)だけのものから4)まで進んだものと色々ある状態です。一歩でも前に進むご助言をお待ちしています。「検討事項」の欄に現状を記録するようにしています。

C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list

C++N4741, 2018 Standard Working Draft on ISO/IEC 14882 sample code compile list

C++N4606, 2016符号断片編纂一覧(example code compile list)

C++N4606, 2016 Working Draft 2016, ISO/IEC 14882, C++ standard(1) Example code compile list
https://qiita.com/kaizen_nagoya/items/df5d62c35bd6ed1c3d43/

C++N3242, 2011 sample code compile list on clang++ and g++

編纂器(Compiler)

clang++ --version

Debian clang version 14.0.5-++20220610033153+c12386ae247c-1~exp1~20220610153237.151
Target: x86_64-pc-linux-gnu, Thread model: posix, InstalledDir: /usr/bin

g++- --version

g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

24.4 Associative containers [associative]C++N4910:2022 (640) p906.cpp

算譜(source code)

p906.cpp
// C++N4910 Committee Draft, Standard for Programming Language C++
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf
const char * n4910 = "24.4 Associative containers  [associative]C++N4910:2022 (640) p906.cpp";
// Debian clang version 14.0.5-++20220610033153+c12386ae247c-
// g++ (GCC) 12.1.0 Copyright (C) 2022 Free Software Foundation, Inc.
// Edited by Dr. OGAWA Kiyoshi. Compile procedure and results record.
// C++N4910:2022 Standard Working Draft on ISO/IEC 14882(0) sample code compile list
// https://qiita.com/kaizen_nagoya/items/fc957ddddd402004bb91

#include "N4910.h"

using namespace std;

#define implementation_defined int

// 24.4.1 In general [associative.general]
// The header <map> defines the class templates map and multimap; the header <set> defines the class templates set and multiset.
// The following exposition-only alias templates may appear in deduction guides for associative containers:
template<class InputIterator> using iter_value_type =
    typename iterator_traits<InputIterator>::value_type;
template<class InputIterator>
using iter_key_type = remove_const_t<
                      typename iterator_traits<InputIterator>::value_type::first_type>;
template<class InputIterator> using iter-mapped-type =
    typename iterator_traits<InputIterator>::value_type::second_type;
template<class InputIterator>
// exposition only // exposition only // exposition only
using iter-to-alloc-type = pair<
                           add_const_t<typename iterator_traits<InputIterator>::value_type::first_type>, typename iterator_traits<InputIterator>::value_type::second_type>; // exposition only
template<ranges::input_range Range> using range_key_type =
    remove_const_t<typename ranges::range_value_t<Range>::first_type>; // exposition only template<ranges::input_range Range>
using range-mapped-type = typename ranges::range_value_t<Range>::second_type; // exposition only template<ranges::input_range Range>
using range-to-alloc-type =
    pair<add_const_t<typename ranges::range_value_t<Range>::first_type>,
    typename ranges::range_value_t<Range>::second_type>;
// 24.4.2 Header <map> synopsis [associative.map.syn]
#include <compare> // see 17.11.1
#include <initializer_list> // see 17.10.2
namespace std {
// 24.4.4, class template map
template<class Key, class T, class Compare = less<Key>,
         class Allocator = allocator<pair<const Key, T>>>
                                     class map;
         template<class Key, class T, class Compare, class Allocator>
         bool operator==(const map<Key, T, Compare, Allocator>& x,
                         const map<Key, T, Compare, Allocator>& y);
         template<class Key, class T, class Compare, class Allocator>
         synth_three_way_result<pair<const Key, T>> operator<=>(const map<Key, T, Compare, Allocator>& x,
                 const map<Key, T, Compare, Allocator>& y);
         template<class Key, class T, class Compare, class Allocator>
         void swap(map<Key, T, Compare, Allocator>& x,
                   map<Key, T, Compare, Allocator>& y)
         noexcept(noexcept(x.swap(y)));
// exposition only
         template<class Key, class T, class Compare, class Allocator, class Predicate>
         typename map<Key, T, Compare, Allocator>::size_type
         erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
// 24.4.5, class template multimap
         template<class Key, class T, class Compare = less<Key>,
                  class Allocator = allocator<pair<const Key, T>>>
                          class multimap;
                  template<class Key, class T, class Compare, class Allocator>
                  bool operator==(const multimap<Key, T, Compare, Allocator>& x,
                                  const multimap<Key, T, Compare, Allocator>& y);
                  template<class Key, class T, class Compare, class Allocator>
                  synth_three_way_result<pair<const Key, T>>
                  operator<=>(const multimap<Key, T, Compare, Allocator>& x,
                              const multimap<Key, T, Compare, Allocator>& y);
                  template<class Key, class T, class Compare, class Allocator>
                  void swap(multimap<Key, T, Compare, Allocator>& x,
                            multimap<Key, T, Compare, Allocator>& y)
                  noexcept(noexcept(x.swap(y)));
                  template<class Key, class T, class Compare, class Allocator, class Predicate>
                  typename multimap<Key, T, Compare, Allocator>::size_type
                  erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
namespace pmr {
template<class Key, class T, class Compare = less<Key>>
using map = std::map<Key, T, Compare,
                     polymorphic_allocator<pair<const Key, T>>>;
                     template<class Key, class T, class Compare = less<Key>>
                     using multimap = std::multimap<Key, T, Compare,
                             polymorphic_allocator<pair<const Key, T>>>;
}
}
// 24.4.3 Header <set> synopsis [associative.set.syn]
#include <compare> // see 17.11.1
#include <initializer_list> // see 17.10.2
                     namespace std {
// 24.4.6, class template set
template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
class set;
template<class Key, class Compare, class Allocator>
bool operator==(const set<Key, Compare, Allocator>& x,
                const set<Key, Compare, Allocator>& y);
template<class Key, class Compare, class Allocator>
synth_three_way_result<Key> operator<=>(const set<Key, Compare, Allocator>& x, const set<Key, Compare, Allocator>& y);
template<class Key, class Compare, class Allocator>
void swap(set<Key, Compare, Allocator>& x,
          set<Key, Compare, Allocator>& y)
noexcept(noexcept(x.swap(y)));
template<class Key, class Compare, class Allocator, class Predicate>
typename set<Key, Compare, Allocator>::size_type
erase_if(set<Key, Compare, Allocator>& c, Predicate pred);
// 24.4.7, class template multiset
template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
class multiset;
template<class Key, class Compare, class Allocator>
bool operator==(const multiset<Key, Compare, Allocator>& x,
                const multiset<Key, Compare, Allocator>& y);
template<class Key, class Compare, class Allocator>
synth_three_way_result<Key> operator<=>(const multiset<Key, Compare, Allocator>& x, const multiset<Key, Compare, Allocator>& y);
template<class Key, class Compare, class Allocator>
void swap(multiset<Key, Compare, Allocator>& x,
          multiset<Key, Compare, Allocator>& y)
noexcept(noexcept(x.swap(y)));
template<class Key, class Compare, class Allocator, class Predicate>
typename multiset<Key, Compare, Allocator>::size_type
erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);
namespace pmr {
template<class Key, class Compare = less<Key>>
using set = std::set<Key, Compare, polymorphic_allocator<Key>>;
template<class Key, class Compare = less<Key>>
using multiset = std::multiset<Key, Compare, polymorphic_allocator<Key>>;
}
}
// 24.4.4 Class template map [map]
// 24.4.4.1 Overview [map.overview]
//  A map is an associative container that supports unique keys (contains at most one of each key value) and provides for fast retrieval of values of another type T based on the keys. The map class supports bidirectional iterators.
//  A map meets all of the requirements of a container (24.2.2.2), of a reversible container (24.2.2.3), of an allocator-aware container (24.2.2.5). and of an associative container (24.2.7). A map also provides most operations described in 24.2.7 for unique keys. This means that a map supports the a_uniq operations in 24.2.7 but not the a_eq operations. For a map<Key,T> the key_type is Key and the value_type is pair<const Key,T>. Descriptions are provided here only for operations on map that are not described in one of those tables or for operations where there is additional semantic information.
namespace std {
template<class Key, class T, class Compare = less<Key>,
         class Allocator = allocator<pair<const Key, T>>>
class map {
public:
// types
    using key_type = Key;
    using mapped_type = T;
    using value_type = pair<const Key, T>;
    using key_compare = Compare;
    using allocator_type = Allocator;
    using pointer = typename allocator_traits<Allocator>::pointer;
    using const_pointer = typename allocator_traits<Allocator>::const_pointer;
    using reference  = value_type&;
    using const_reference = const value_type&;
    using size_type = implementation_defined ; // see 24.2
    using difference_type = implementation_defined ; // see 24.2
    using iterator = implementation_defined ; // see 24.2
    using const_iterator = implementation_defined ; // see 24.2
    using reverse_iterator = std::reverse_iterator<iterator>;
    using const_reverse_iterator = std::reverse_iterator<const_iterator>;
    using node_type  = unspecified;
    using insert_return_type = insertz_return_type<iterator, node_type>;
    class value_compare {
        friend class map;
    protected:
        Compare comp;
        value_compare(Compare c) : comp(c) {}
    public:
        bool operator()(const value_type& x, const value_type& y) const {
            return comp(x.first, y.first);
        }
    };
// 24.4.4.2, construct/copy/destroy
    map() : map(Compare()) { }
    explicit map(const Compare& comp, const Allocator& = Allocator());
    template<class InputIterator>
    map(InputIterator first, InputIterator last,
        const Compare& comp = Compare(), const Allocator& = Allocator());
    template<container_compatible_range<value_type> R>
    map(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
    map(const map& x);
    map(map&& x);
    explicit map(const Allocator&);
    map(const map&, const type_identity_t<Allocator>&);
    map(map&&, const type_identity_t<Allocator>&);
    map(initializer_list<value_type>,
        const Compare& = Compare(),
        const Allocator& = Allocator());
    template<class InputIterator>
    map(InputIterator first, InputIterator last, const Allocator& a)
        : map(first, last, Compare(), a) { }
    template<container_compatible_range<value_type> R> map(from_range_t, R&& rg, const Allocator& a))
        : map(from_range, std::forward<R>(rg), Compare(), a) { }
    map(initializer_list<value_type> il, const Allocator& a)
        : map(il, Compare(), a) { } ~map();
    map& operator=(const map& x);
    map& operator=(map&& x)
    noexcept(allocator_traits<Allocator>::is_always_equal::value &&
             is_nothrow_move_assignable_v<Compare>);
    map& operator=(initializer_list<value_type>);
    allocator_type get_allocator() const noexcept;
// iterators
    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;
// capacity
    [[nodiscard]] bool empty() const noexcept;
    size_type size() const noexcept;
    size_type max_size() const noexcept;
// 24.4.4.3, element access
    mapped_type& operator[](const key_type& x);
    mapped_type& operator[](key_type&& x);
    mapped_type& at(const key_type& x);
    const mapped_type& at(const key_type& x) const;
// 24.4.4.4, modifiers
    template<class... Args> pair<iterator, bool> emplace(Args&&... args);
    template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args);
    pair<iterator, bool> insert(const value_type& x);
    pair<iterator, bool> insert(value_type&& x);
    template<class P> pair<iterator, bool> insert(P&& x);
    iterator insert(const_iterator position, const value_type& x);
    iterator insert(const_iterator position, value_type&& x);
    template<class P>
    iterator insert(const_iterator position, P&&);
    template<class InputIterator>
    void insert(InputIterator first, InputIterator last);
    template<container-compatible-range<value_type> R>
    void insert_range(R&& rg);
    void insert(initializer_list<value_type>);
    node_type extract(const_iterator position);
    node_type extract(const key_type& x);
    template<class K> node_type extract(K&& x);
    insert_return_type insert(node_type&& nh);
    iterator           insert(const_iterator hint, node_type&& nh);
    template<class... Args>
    pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
    template<class... Args>
    pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
    template<class... Args>
    iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
    template<class... Args>
    iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
    template<class M>
    pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
    template<class M>
    pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
    template<class M>
    iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
    template<class M>
    iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
    iterator  erase(iterator position);
    iterator  erase(const_iterator position);
    size_type erase(const key_type& x);
    template<class K> size_type erase(K&& x);
    iterator  erase(const_iterator first, const_iterator last);
    void      swap(map&)
    noexcept(allocator_traits<Allocator>::is_always_equal::value &&
             is_nothrow_swappable_v<Compare>);
    void      clear() noexcept;
    template<class C2>
    void merge(map<Key, T, C2, Allocator>& source);
    template<class C2>
    void merge(map<Key, T, C2, Allocator>&& source);
    template<class C2>
    void merge(multimap<Key, T, C2, Allocator>& source);
    template<class C2>
    void merge(multimap<Key, T, C2, Allocator>&& source);
// observers
    key_compare key_comp() const;
    value_compare value_comp() const;
// map operations
    iterator       find(const key_type& x);
    const_iterator find(const key_type& x) const;
    template<class K> iterator       find(const K& x);
// Effects: Constructs an empty map using the specified comparison object and allocator. Complexity: Constant.
    template<class K> const_iterator find(const K& x) const;
    size_type      count(const key_type& x) const;
    template<class K> size_type count(const K& x) const;
    bool           contains(const key_type& x) const;
    template<class K> bool contains(const K& x) const;
    iterator       lower_bound(const key_type& x);
    const_iterator lower_bound(const key_type& x) const;
    template<class K> iterator       lower_bound(const K& x);
    template<class K> const_iterator lower_bound(const K& x) const;
    iterator       upper_bound(const key_type& x);
    const_iterator upper_bound(const key_type& x) const;
    template<class K> iterator       upper_bound(const K& x);
    template<class K> const_iterator upper_bound(const K& x) const;
    pair<iterator, iterator>
    pair<const_iterator, const_iterator>
    template<class K>
    pair<iterator, iterator>
    template<class K>
    equal_range(const key_type& x);
    equal_range(const key_type& x) const;
    equal_range(const K& x);
    pair<const_iterator, const_iterator> equal_range(const K& x) const;
};
template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
         map(InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator())
         -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
         template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
                  map(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
                  -> map<range_key_type<R>, range-mapped-type<R>, Compare, Allocator>;
                  template<class Key, class T, class Compare = less<Key>,
                           class Allocator = allocator<pair<const Key, T>>>
                                   map(initializer_list<pair<Key, T>>, Compare = Compare(), Allocator = Allocator())
                                   -> map<Key, T, Compare, Allocator>;
                           template<class InputIterator, class Allocator>
                           map(InputIterator, InputIterator, Allocator)
                           -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
                           template<ranges::input_range R, class Allocator>
                           map(from_range_t, R&&, Allocator)
                           -> map<range_key_type<R>, range_mapped_type<R>, less<range_key_type<R>>, Allocator>;
                           template<class Key, class T, class Allocator>
                           map(initializer_list<pair<Key, T>>, Allocator) -> map<Key, T, less<Key>, Allocator>;
}
// 24.4.4.2 Constructors, copy, and assignment [map.cons]
                           explicit map(const Compare& comp, const Allocator& = Allocator());
                  template<class InputIterator>
                  map(InputIterator first, InputIterator last,
                      const Compare& comp = Compare(), const Allocator& = Allocator());
// Effects: Constructs an empty map using the specified comparison object and allocator, and inserts elements from the range [first, last).
// Complexity: Linear in N if the range [first,last) is already sorted using comp and otherwise N logN, where N is last - first.
                  template<container_compatible_range<value_type> R>
                  map(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
// Effects: Constructs an empty map using the specified comparison object and allocator, and inserts elements from the range rg.
// Complexity: Linear in N if rg is already sorted using comp and otherwise NlogN, where N is ranges::distance(rg).
// 24.4.4.3 Element access [map.access]
                  mapped_type& operator[](const key_type& x);
// Effects: Equivalent to: return try_emplace(x).first->second; mapped_type& operator[](key_type&& x);
// Effects: Equivalent to: return try_emplace(move(x)).first->second; mapped_type& at(const key_type& x);
                  const mapped_type& at(const key_type& x) const;
// Returns: A reference to the mapped_type corresponding to x in *this.
// Throws: An exception object of type out_of_range if no such element is present. Complexity: Logarithmic.
// 24.4.4.4 Modifiers [map.modifiers]
                  template<class P>
                  pair<iterator, bool> insert(P&& x);
                  template<class P>
                  iterator insert(const_iterator position, P&& x);
// Constraints: is_constructible_v<value_type, P&&> is true.
// Effects: The first form is equivalent to return emplace(std::forward<P>(x)). The second form is equivalent to return emplace_hint(position, std::forward<P>(x)).
                  template<class... Args>
                  pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
                  template<class... Args>
                  iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
// Preconditions: value_type is Cpp17EmplaceConstructible into map from piecewise_construct, for- ward_as_tuple(k), forward_as_tuple(std::forward<Args>(args)...).
// Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k), forward_as_tuple(std::forward<Args>(args)...).
// Returns: In the first overload, the bool component of the returned pair is true if and only if the insertion took place. The returned iterator points to the map element whose key is equivalent to k.
// Complexity: The same as emplace and emplace_hint, respectively.
                  template<class... Args>
                  pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
                  template<class... Args>
                  iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
// Preconditions: value_type is Cpp17EmplaceConstructible into map from piecewise_construct, for- ward_as_tuple(std::move(k)), forward_as_tuple(std::forward<Args>(args)...).
// Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise inserts an object of type value_type constructed with piecewise_construct, forward_- as_tuple(std::move(k)), forward_as_tuple(std::forward<Args>(args)...).
// Returns: In the first overload, the bool component of the returned pair is true if and only if the insertion took place. The returned iterator points to the map element whose key is equivalent to k.
// Complexity: The same as emplace and emplace_hint, respectively.
                  template<class M>
                  pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
                  template<class M>
                  iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
// Mandates: is_assignable_v<mapped_type&, M&&> is true.
// Preconditions: value_type is Cpp17EmplaceConstructible into map from k, forward<M>(obj).
// Effects: If the map already contains an element e whose key is equivalent to k, assigns std::for- ward<M>(obj) to e.second. Otherwise inserts an object of type value_type constructed with k, std::forward<M>(obj).
// Returns: In the first overload, the bool component of the returned pair is true if and only if the insertion took place. The returned iterator points to the map element whose key is equivalent to k.
// Complexity: The same as emplace and emplace_hint, respectively.
                  template<class M>
                  pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
                  template<class M>
                  iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
// Mandates: is_assignable_v<mapped_type&, M&&> is true.
// Preconditions: value_type is Cpp17EmplaceConstructible into map from move(k), forward<M>(obj).
// Effects: If the map already contains an element e whose key is equivalent to k, assigns std::for- ward<M>(obj) to e.second. Otherwise inserts an object of type value_type constructed with std:: move(k), std::forward<M>(obj).
// Returns: In the first overload, the bool component of the returned pair is true if and only if the insertion took place. The returned iterator points to the map element whose key is equivalent to k.
// Complexity: The same as emplace and emplace_hint, respectively. // // // 24.4.4.5 Erasure [map.erasure]
                  template<class Key, class T, class Compare, class Allocator, class Predicate>
                  typename map<Key, T, Compare, Allocator>::size_type
                  erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
// Effects: Equivalent to:
                  auto original_size = c.size();
for (auto i = c.begin(), last = c.end(); i != last; ) {
    if (pred(*i)) {
        i = c.erase(i);
    } else {
        ++i;
    }
}
return original_size - c.size();
// 24.4.5 Class template multimap  [multimap]
// 24.4.5.1 Overview  [multimap.overview]
//  A multimap is an associative container that supports equivalent keys (possibly containing multiple copies of the same key value) and provides for fast retrieval of values of another type T based on the keys. The multimap class supports bidirectional iterators.
// A multimap meets all of the requirements of a container (24.2.2.2), of a reversible container (24.2.2.3), of an allocator-aware container (24.2.2.5), and of an associative container (24.2.7). A multimap also provides most operations described in 24.2.7 for equal keys. This means that a multimap supports the a_eq operations in 24.2.7 but not the a_uniq operations. For a multimap<Key,T> the key_type is Key and the value_type is pair<const Key,T>. Descriptions are provided here only for operations on multimap that are not described in one of those tables or for operations where there is additional semantic information.
namespace std {
template<class Key, class T, class Compare = less<Key>,
         class Allocator = allocator<pair<const Key, T>>>
class multimap {
public:
// types
    using key_type = Key;
    using mapped_type =T;
    using value_type  = pair<const Key, T>;
    using key_compare = Compare;
    using allocator_type = Allocator;
    using pointer = typename allocator_traits<Allocator>::pointer;
    using const_pointer = typename allocator_traits<Allocator>::const_pointer;
    using reference = value_type&;
    using const_reference = const value_type&;
    using size_type = implementation_defined ; // see 24.2
    using difference_type = implementation_defined ; // see 24.2
    using iterator = implementation_defined ; // see 24.2
    using const_iterator = implementation_defined ; // see 24.2
    using reverse_iterator = std::reverse_iterator<iterator>;
    using const_reverse_iterator = std::reverse_iterator<const_iterator>;
    using node_type = unspecified ;
protected:
    Compare comp;
    value_compare(Compare c) : comp(c) { }
public:
    bool operator()(const value_type& x, const value_type& y) const {
        return comp(x.first, y.first);
    }
};
// 24.4.5.2, construct/copy/destroy
multimap() : multimap(Compare()) { }
explicit multimap(const Compare& comp, const Allocator& = Allocator());
template<class InputIterator>
multimap(InputIterator first, InputIterator last,
         const Compare& comp = Compare(),
         const Allocator& = Allocator());
template<container_compatible_range<value_type> R>
multimap(from_range_t, R&& rg,
         const Compare& comp = Compare(), const Allocator& = Allocator());
multimap(const multimap& x);
multimap(multimap&& x);
explicit multimap(const Allocator&);
multimap(const multimap&, const type_identity_t<Allocator>&);
multimap(multimap&&, const type_identity_t<Allocator>&);
multimap(initializer_list<value_type>,
         const Compare& = Compare(),
         const Allocator& = Allocator());
template<class InputIterator>
multimap(InputIterator first, InputIterator last, const Allocator& a)
    : multimap(first, last, Compare(), a) { }
template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
    : multimap(from_range, std::forward<R>(rg), Compare(), a) { }
class value_compare {
    friend class multimap;
    multimap(initializer_list<value_type> il, const Allocator& a)
        : multimap(il, Compare(), a) { }
    ~multimap();
    multimap& operator=(const multimap& x);
    multimap& operator=(multimap&& x)
    noexcept(allocator_traits<Allocator>::is_always_equal::value &&
             is_nothrow_move_assignable_v<Compare>);
    multimap& operator=(initializer_list<value_type>);
    allocator_type get_allocator() const noexcept;
// iterators
    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;
// capacity
    [[nodiscard]] bool empty() const noexcept;
    size_type size() const noexcept;
    size_type max_size() const noexcept;
// 24.4.5.3, modifiers
    template<class... Args> iterator emplace(Args&&... args);
    template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args);
    iterator insert(const value_type& x);
    iterator insert(value_type&& x);
    template<class P> iterator insert(P&& x);
    iterator insert(const_iterator position, const value_type& x);
    iterator insert(const_iterator position, value_type&& x);
    template<class P> iterator insert(const_iterator position, P&& x);
    template<class InputIterator>
    void insert(InputIterator first, InputIterator last);
    template<container_compatible_range<value_type> R>
    void insert_range(R&& rg);
    void insert(initializer_list<value_type>);
    node_type extract(const_iterator position);
    node_type extract(const key_type& x);
    template<class K> node_type extract(K&& x);
    iterator insert(node_type&& nh);
    iterator insert(const_iterator hint, node_type&& nh);
    iterator  erase(iterator position);
    iterator  erase(const_iterator position);
    size_type erase(const key_type& x);
    template<class K> size_type erase(K&& x);
    iterator  erase(const_iterator first, const_iterator last);
    void      swap(multimap&)
    noexcept(allocator_traits<Allocator>::is_always_equal::value &&
             is_nothrow_swappable_v<Compare>);
    void      clear() noexcept;
    template<class C2>
    void merge(multimap<Key, T, C2, Allocator>& source);
    template<class C2>
    void merge(multimap<Key, T, C2, Allocator>&& source);
    template<class C2>
    void merge(map<Key, T, C2, Allocator>& source);
    template<class C2>
    void merge(map<Key, T, C2, Allocator>&& source);
// observers
    key_compare key_comp() const;
    value_compare value_comp() const;
// map operations
    iterator       find(const key_type& x);
    const_iterator find(const key_type& x) const;
    template<class K> iterator       find(const K& x);
    template<class K> const_iterator find(const K& x) const;
    size_type      count(const key_type& x) const;
    template<class K> size_type count(const K& x) const;
    bool           contains(const key_type& x) const;
    template<class K> bool contains(const K& x) const;
    iterator       lower_bound(const key_type& x);
    const_iterator lower_bound(const key_type& x) const;
    template<class K> iterator       lower_bound(const K& x);
    template<class K> const_iterator lower_bound(const K& x) const;
    iterator       upper_bound(const key_type& x);
    const_iterator upper_bound(const key_type& x) const;
    template<class K> iterator       upper_bound(const K& x);
    template<class K> const_iterator upper_bound(const K& x) const;
    pair<iterator, iterator>
    pair<const_iterator, const_iterator>
    template<class K>
    pair<iterator, iterator>
    template<class K>
    equal_range(const key_type& x);
    equal_range(const key_type& x) const;
    equal_range(const K& x);
    pair<const_iterator, const_iterator> equal_range(const K& x) const;
};
template<class InputIterator, class Compare = less<iter_key_type<InputIterator>>, class Allocator = allocator<iter_to_alloc-type<InputIterator>>>
         multimap(InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
                 Compare, Allocator>;
         template<ranges::input_range R, class Compare = less<range_key_type<R>>, class Allocator = allocator<range_to_alloc_type<R>>>
                  multimap(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
                  -> multimap<range_key_type<R>, range_mapped_type<R>, Compare, Allocator>;
                  template<class Key, class T, class Compare = less<Key>,
                           class Allocator = allocator<pair<const Key, T>>>
                                   multimap(initializer_list<pair<Key, T>>, Compare = Compare(), Allocator = Allocator())
                                   -> multimap<Key, T, Compare, Allocator>;
                           template<class InputIterator, class Allocator>
                           multimap(InputIterator, InputIterator, Allocator)
                           -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
                           Effects:
                           Constructs an empty multimap using the specified comparison object and allocator. Complexity:
                           Constant.
                           template<ranges::input_range R, class Allocator>
                           multimap(from_range_t, R&&, Allocator)
                           -> multimap<range_key_type<R>, range_mapped_type<R>, less<range_key_type<R>>, Allocator>;
                           template<class Key, class T, class Allocator>
                           multimap(initializer_list<pair<Key, T>>, Allocator)
                           -> multimap<Key, T, less<Key>, Allocator>;
}
// 24.4.5.2 Constructors [multimap.cons]
                           explicit multimap(const Compare& comp, const Allocator& = Allocator());
                  template<class InputIterator>
                  multimap(InputIterator first, InputIterator last,
                           const Compare& comp = Compare(),
                           const Allocator& = Allocator());
// Effects: Constructs an empty multimap using the specified comparison object and allocator, and inserts elements from the range [first, last).
// Complexity: Linear in N if the range [first,last) is already sorted using comp and otherwise N logN, where N is last - first.
                  template<container_compatible_range<value_type> R>
                  multimap(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
// Effects: Constructs an empty multimap using the specified comparison object and allocator, and inserts elements from the range rg.
// Complexity: Linear in N if rg is already sorted using comp and otherwise NlogN, where N is ranges::distance(rg).
// 24.4.5.3 Modifiers [multimap.modifiers]
                  template<class P> iterator insert(P&& x);
                  template<class P> iterator insert(const_iterator position, P&& x);
// Constraints: is_constructible_v<value_type, P&&> is true.
// Effects: The first form is equivalent to return emplace(std::forward<P>(x)). The second form is equivalent to return emplace_hint(position, std::forward<P>(x)).
// 24.4.5.4 Erasure [multimap.erasure]
                  template<class Key, class T, class Compare, class Allocator, class Predicate>
                  typename multimap<Key, T, Compare, Allocator>::size_type
                  erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
// Effects: Equivalent to:
                  auto original_size = c.size();
for (auto i = c.begin(), last = c.end(); i != last; ) {
    if (pred(*i)) {
        i = c.erase(i);
    } else {
        ++i;
    }
}
return original_size - c.size();
// 24.4.6 Class template set  [set]
// 24.4.6.1 Overview [set.overview]
//  A set is an associative container that supports unique keys (contains at most one of each key value) and provides for fast retrieval of the keys themselves. The set class supports bidirectional iterators.
//  A set meets all of the requirements of a container (24.2.2.2), of a reversible container (24.2.2.3), of an allocator-aware container (24.2.2.5). and of an associative container (24.2.7). A set also provides most operations described in 24.2.7 for unique keys. This means that a set supports the a_uniq operations in 24.2.7 but not the a_eq operations. For a set<Key> both the key_type and value_type are Key. Descriptions are provided here only for operations on set that are not described in one of these tables and for operations where there is additional semantic information.
namespace std {
template<class Key, class Compare = less<Key>,
         class Allocator = allocator<Key>>
class set {
public:
// types
    using key_type = Key;
    using key_compare = Compare;
    using value_type = Key;
    using value_compare = Compare;
    using allocator_type = Allocator;
    using pointer = typename allocator_traits<Allocator>::pointer;
    using const_pointer = typename allocator_traits<Allocator>::const_pointer;
    using reference = value_type&;
    using const_reference = const value_type&;
    using size_type = implementation_defined ; // see 24.2
    using difference_type = implementation_defined ; // see 24.2
    using iterator = implementation_defined ; // see 24.2
    using const_iterator = implementation_defined ; // see 24.2
    using reverse_iterator = std::reverse_iterator<iterator>;
    using const_reverse_iterator = std::reverse_iterator<const_iterator>;
    using node_type = unspecified ;
    using insert_return_type = insert_return_type<iterator, node_type>;
// 24.4.6.2, construct/copy/destroy
    set() : set(Compare()) { }
    explicit set(const Compare& comp, const Allocator& = Allocator());
    template<class InputIterator>
    set(InputIterator first, InputIterator last,
        const Compare& comp = Compare(), const Allocator& = Allocator());
    template<container_compatible_range<value_type> R>
    set(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
    set(const set& x);
    set(set&& x);
    explicit set(const Allocator&);
    set(const set&, const type_identity_t<Allocator>&);
    set(set&&, const type_identity_t<Allocator>&);
    set(initializer_list<value_type>, const Compare& = Compare(),
        const Allocator& = Allocator());
    template<class InputIterator>
    set(InputIterator first, InputIterator last, const Allocator& a)
        : set(first, last, Compare(), a) { }
    template<container_compatible_range<value_type> R> set(from_range_t, R&& rg, const Allocator& a))
        : set(from_range, std::forward<R>(rg), Compare(), a) { }
    set(initializer_list<value_type> il, const Allocator& a)
        : set(il, Compare(), a) { } ~set();
    set& operator=(const set& x);
    set& operator=(set&& x)
    noexcept(allocator_traits<Allocator>::is_always_equal::value &&
             is_nothrow_move_assignable_v<Compare>);
    set& operator=(initializer_list<value_type>);
    allocator_type get_allocator() const noexcept;
// iterators
    iterator               begin() noexcept;
    const_iterator   begin() const noexcept;
    reverse_iterator end() noexcept;
    const_iterator  end() const 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;
// capacity
    [[nodiscard]] bool empty() const noexcept;
    size_type size() const noexcept;
    size_type max_size() const noexcept;
// modifiers
    template<class... Args> pair<iterator, bool> emplace(Args&&... args);
    template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args);
    pair<iterator,bool> insert(const value_type& x);
    pair<iterator,bool> insert(value_type&& x);
    iterator insert(const_iterator position, const value_type& x);
    iterator insert(const_iterator position, value_type&& x);
    template<class InputIterator>
    void insert(InputIterator first, InputIterator last);
    template<container-compatible-range<value_type> R>
    void insert_range(R&& rg);
    void insert(initializer_list<value_type>);
    node_type extract(const_iterator position);
    node_type extract(const key_type& x);
    template<class K> node_type extract(K&& x);
    insert_return_type insert(node_type&& nh);
    iterator           insert(const_iterator hint, node_type&& nh);
    iterator  erase(iterator position);
    iterator  erase(const_iterator position);
    size_type erase(const key_type& x);
    template<class K> size_type erase(K&& x);
    iterator  erase(const_iterator first, const_iterator last);
    void      swap(set&)
    noexcept(allocator_traits<Allocator>::is_always_equal::value &&
             is_nothrow_swappable_v<Compare>);
    void      clear() noexcept;
    template<class C2>
    void merge(set<Key, C2, Allocator>& source);
    template<class C2>
    void merge(set<Key, C2, Allocator>&& source);
    template<class C2>
    void merge(multiset<Key, C2, Allocator>& source);
    template<class C2>
    void merge(multiset<Key, C2, Allocator>&& source);
// observers
    key_compare key_comp() const;
    value_compare value_comp() const;
// set operations
    iterator       find(const key_type& x);
    const_iterator find(const key_type& x) const;
    rbegin() noexcept;
// Effects: Constructs an empty set using the specified comparison objects and allocator. Complexity: Constant.
    template<class K> iterator       find(const K& x);
    template<class K> const_iterator find(const K& x) const;
    size_type      count(const key_type& x) const;
    template<class K> size_type count(const K& x) const;
    bool           contains(const key_type& x) const;
    template<class K> bool contains(const K& x) const;
    iterator       lower_bound(const key_type& x);
    const_iterator lower_bound(const key_type& x) const;
    template<class K> iterator       lower_bound(const K& x);
    template<class K> const_iterator lower_bound(const K& x) const;
    iterator       upper_bound(const key_type& x);
    const_iterator upper_bound(const key_type& x) const;
    template<class K> iterator       upper_bound(const K& x);
    template<class K> const_iterator upper_bound(const K& x) const;
    pair<iterator, iterator>
    pair<const_iterator, const_iterator>
    template<class K>
    pair<iterator, iterator>
    template<class K>
    equal_range(const key_type& x);
    equal_range(const key_type& x) const;
    equal_range(const K& x);
    pair<const_iterator, const_iterator> equal_range(const K& x) const;
};
template<class InputIterator,
         class Compare = less<iter_value_type<InputIterator>>,
         class Allocator = allocator<iter_value_type<InputIterator>>>
                                     set(InputIterator, InputIterator,
                                             Compare = Compare(), Allocator = Allocator())
                                     -> set<iter-value-type<InputIterator>, Compare, Allocator>;
         template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>,
                  class Allocator = allocator<ranges::range_value_t<R>>>
                          set(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
                          -> set<ranges::range_value_t<R>, Compare, Allocator>;
                  template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
                  set(initializer_list<Key>, Compare = Compare(), Allocator = Allocator())
                  -> set<Key, Compare, Allocator>;
                  template<class InputIterator, class Allocator>
                  set(InputIterator, InputIterator, Allocator)
                  -> set<iter_value_type<InputIterator>, less<iter_value_type<InputIterator>>, Allocator>;
                  template<ranges::input_range R, class Allocator>
                  set(from_range_t, R&&, Allocator)
                  -> set<ranges::range_value_t<R>, less<ranges::range_value_t<R>>, Allocator>;
                  template<class Key, class Allocator>
                  set(initializer_list<Key>, Allocator) -> set<Key, less<Key>, Allocator>;
}
// 24.4.6.2 Constructors, copy, and assignment [set.cons]
                  explicit set(const Compare& comp, const Allocator& = Allocator());
         template<class InputIterator>
         set(InputIterator first, InputIterator last,
             const Compare& comp = Compare(), const Allocator& = Allocator());
// Effects: Constructs an empty set using the specified comparison object and allocator, and inserts elements from the range [first, last).
// Complexity: Linear in N if the range [first,last) is already sorted using comp and otherwise N logN, where N is last - first.
         template<container-compatible-range<value_type> R>
         set(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
// Effects: Constructs an empty set using the specified comparison object and allocator, and inserts elements from the range rg.
// Complexity: Linear in N if rg is already sorted using comp and otherwise NlogN, where N is ranges::distance(rg).
// 24.4.6.3 Erasure [set.erasure]
         template<class Key, class Compare, class Allocator, class Predicate>
         typename set<Key, Compare, Allocator>::size_type
         erase_if(set<Key, Compare, Allocator>& c, Predicate pred);
// Effects: Equivalent to:
         auto original_size = c.size();
for (auto i = c.begin(), last = c.end(); i != last; ) {
    if (pred(*i)) {
        i = c.erase(i);
    } else {
        ++i;
    }
}
return original_size - c.size();
// 24.4.7 Class template multiset  [multiset]
// 24.4.7.1 Overview [multiset.overview]
//  A multiset is an associative container that supports equivalent keys (possibly contains multiple copies of the same key value) and provides for fast retrieval of the keys themselves. The multiset class supports bidirectional iterators.
//  A multiset meets all of the requirements of a container (24.2.2.2), of a reversible container (24.2.2.3), of an allocator-aware container (24.2.2.5), of an associative container (24.2.7). multiset also provides most operations described in 24.2.7 for duplicate keys. This means that a multiset supports the a_eq operations in 24.2.7 but not the a_uniq operations. For a multiset<Key> both the key_type and value_type are Key. Descriptions are provided here only for operations on multiset that are not described in one of these tables and for operations where there is additional semantic information.
namespace std {
template<class Key, class Compare = less<Key>,
         class Allocator = allocator<Key>>
class multiset {
public:
// types
    using key_type = Key;
    using key_compare = Compare;
    using value_type = Key;
    using value_compare = Compare;
    using allocator_type = Allocator;
    using pointer = typename allocator_traits<Allocator>::pointer;
    using const_pointer = typename allocator_traits<Allocator>::const_pointer;
    using reference = value_type&;
    using const_reference = const value_type&;
    using size_type = implementation_defined ; // see 24.2
    using difference_type = implementation_defined ; // see 24.2
    using  iterator = implementation_defined ; // see 24.2
    using   const_iterator = implementation_defined ; // see 24.2
    using reverse_iterator = std::reverse_iterator<iterator>;
    using const_reverse_iterator = std::reverse_iterator<const_iterator>;
    using node_type = unspecified ;
// 24.4.7.2, construct/copy/destroy
    multiset() : multiset(Compare()) { }
    explicit multiset(const Compare& comp, const Allocator& = Allocator());
    template<class InputIterator>
    multiset(InputIterator first, InputIterator last,
             const Compare& comp = Compare(), const Allocator& = Allocator());
    template<container_compatible_range<value_type> R> multiset(from_range_t, R&& rg,
            const Compare& comp = Compare(), const Allocator& = Allocator());
    multiset(const multiset& x);
    multiset(multiset&& x);
    explicit multiset(const Allocator&);
    multiset(const multiset&, const type_identity_t<Allocator>&);
    multiset(multiset&&, const type_identity_t<Allocator>&);
    multiset(initializer_list<value_type>, const Compare& = Compare(),
             const Allocator& = Allocator());
    template<class InputIterator>
    multiset(InputIterator first, InputIterator last, const Allocator& a)
        : multiset(first, last, Compare(), a) { }
    template<container_compatible_range<value_type> R> multiset(from_range_t, R&& rg, const Allocator& a))
        : multiset(from_range, std::forward<R>(rg), Compare(), a) { }
    multiset(initializer_list<value_type> il, const Allocator& a)
        : multiset(il, Compare(), a) { } ~multiset();
    multiset& operator=(const multiset& x);
    multiset& operator=(multiset&& x)
    noexcept(allocator_traits<Allocator>::is_always_equal::value &&
             is_nothrow_move_assignable_v<Compare>);
    multiset& operator=(initializer_list<value_type>);
    allocator_type get_allocator() const noexcept;
// iterators
    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;
// capacity
    [[nodiscard]] bool empty() const noexcept;
    size_type size() const noexcept;
    size_type max_size() const noexcept;
// modifiers
    template<class... Args> iterator emplace(Args&&... args);
    template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args);
    iterator insert(const value_type& x);
    iterator insert(value_type&& x);
    iterator insert(const_iterator position, const value_type& x);
    iterator insert(const_iterator position, value_type&& x);
    template<class InputIterator>
    void insert(InputIterator first, InputIterator last);
    template<container_compatible_range<value_type> R>
    void insert_range(R&& rg);
    void insert(initializer_list<value_type>);
    node_type extract(const_iterator position);
    node_type extract(const key_type& x);
    template<class K> node_type extract(K&& x);
    iterator insert(node_type&& nh);
    iterator insert(const_iterator hint, node_type&& nh);
    iterator  erase(iterator position);
    iterator  erase(const_iterator position);
    size_type erase(const key_type& x);
    template<class K> size_type erase(K&& x);
    iterator  erase(const_iterator first, const_iterator last);
    void      swap(multiset&)
    noexcept(allocator_traits<Allocator>::is_always_equal::value &&
             is_nothrow_swappable_v<Compare>);
    void      clear() noexcept;
    template<class C2>
    void merge(multiset<Key, C2, Allocator>& source);
    template<class C2>
    void merge(multiset<Key, C2, Allocator>&& source);
    template<class C2>
    void merge(set<Key, C2, Allocator>& source);
    template<class C2>
    void merge(set<Key, C2, Allocator>&& source);
// observers
    key_compare key_comp() const;
    value_compare value_comp() const;
// set operations
    iterator       find(const key_type& x);
    const_iterator find(const key_type& x) const;
    template<class K> iterator       find(const K& x);
    template<class K> const_iterator find(const K& x) const;
    size_type      count(const key_type& x) const;
    template<class K> size_type count(const K& x) const;
    bool           contains(const key_type& x) const;
    template<class K> bool contains(const K& x) const;
    iterator       lower_bound(const key_type& x);
    const_iterator lower_bound(const key_type& x) const;
    template<class K> iterator       lower_bound(const K& x);
    template<class K> const_iterator lower_bound(const K& x) const;
    iterator       upper_bound(const key_type& x);
    const_iterator upper_bound(const key_type& x) const;
    template<class K> iterator       upper_bound(const K& x);
    template<class K> const_iterator upper_bound(const K& x) const;
    pair<iterator, iterator>
    pair<const_iterator, const_iterator>
    template<class K>
    pair<iterator, iterator>
    equal_range(const key_type& x);
    equal_range(const key_type& x) const;
    equal_range(const K& x);
// Effects: Constructs an empty multiset using the specified comparison object and allocator. Complexity: Constant.
    template<class K>
    pair<const_iterator, const_iterator> equal_range(const K& x) const;
};
template<class InputIterator,
         class Compare = less<iter_value_type<InputIterator>>,
         class Allocator = allocator<iter_value_type<InputIterator>>>
                                     multiset(InputIterator, InputIterator,
                                             Compare = Compare(), Allocator = Allocator())
                                     -> multiset<iter_value_type<InputIterator>, Compare, Allocator>;
         template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>,
                  class Allocator = allocator<ranges::range_value_t<R>>>
                          multiset(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
                          -> multiset<ranges::range_value_t<R>, Compare, Allocator>;
                  template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
                  multiset(initializer_list<Key>, Compare = Compare(), Allocator = Allocator())
                  -> multiset<Key, Compare, Allocator>;
                  template<class InputIterator, class Allocator>
                  multiset(InputIterator, InputIterator, Allocator)
                  -> multiset<iter_value_type<InputIterator>, less<iter_value_type<InputIterator>>, Allocator>;
                  template<ranges::input_range R, class Allocator>
                  multiset(from_range_t, R&&, Allocator)
                  -> multiset<ranges::range_value_t<R>, less<ranges::range_value_t<R>>, Allocator>;
                  template<class Key, class Allocator>
                  multiset(initializer_list<Key>, Allocator) -> multiset<Key, less<Key>, Allocator>;
}
// 24.4.7.2 Constructors [multiset.cons]
                  explicit multiset(const Compare& comp, const Allocator& = Allocator());
         template<class InputIterator>
         multiset(InputIterator first, InputIterator last,
                  const Compare& comp = Compare(), const Allocator& = Allocator());
// Effects: Constructs an empty multiset using the specified comparison object and allocator, and inserts elements from the range [first, last).
// Complexity: Linear in N if the range [first,last) is already sorted using comp and otherwise N logN, where N is last - first.
         template<container-compatible-range<value_type> R>
         multiset(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
// Effects: Constructs an empty multiset using the specified comparison object and allocator, and inserts elements from the range rg.
// Complexity: Linear in N if rg is already sorted using comp and otherwise NlogN, where N is ranges::distance(rg).
// 24.4.7.3 Erasure [multiset.erasure]
         template<class Key, class Compare, class Allocator, class Predicate>
         typename multiset<Key, Compare, Allocator>::size_type
         erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);
// Effects: Equivalent to:
         auto original_size = c.size();
for (auto i = c.begin(), last = c.end(); i != last; ) {
    if (pred(*i)) {
        i = c.erase(i);
    } else {
        ++i;
    }
}
return original_size - c.size();
int main() {
    cout  <<  n4910 << endl;
    return EXIT_SUCCESS;
}

編纂・実行結果(compile and go)

bash
$ clang++ p906.cpp -std=03 -o p906l -I. -Wall
In file included from p906.cpp:10:
In file included from ./N4910.h:11:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/atomic:38:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/c++0x_warning.h:32:2: error: This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
 ^
p906.cpp:20:5: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
    typename iterator_traits<InputIterator>::value_type;
    ^
p906.cpp:22:23: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using iter_key_type = remove_const_t<
                      ^
p906.cpp:22:23: error: no template named 'remove_const_t'
p906.cpp:24:31: error: cannot template a using declaration
template<class InputIterator> using iter-mapped-type =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
p906.cpp:24:41: error: expected external declaration
template<class InputIterator> using iter-mapped-type =
                                        ^
p906.cpp:24:42: error: unknown type name 'mapped'
template<class InputIterator> using iter-mapped-type =
                                         ^
p906.cpp:24:48: error: expected unqualified-id
template<class InputIterator> using iter-mapped-type =
                                               ^
p906.cpp:28:1: error: cannot template a using declaration
using iter-to-alloc-type = pair<
^
p906.cpp:28:11: error: expected external declaration
using iter-to-alloc-type = pair<
          ^
p906.cpp:28:12: error: unknown type name 'to'
using iter-to-alloc-type = pair<
           ^
p906.cpp:28:14: error: expected unqualified-id
using iter-to-alloc-type = pair<
             ^
p906.cpp:30:10: error: use of undeclared identifier 'ranges'
template<ranges::input_range Range> using range_key_type =
         ^
p906.cpp:31:1: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
remove_const_t<typename ranges::range_value_t<Range>::first_type>; // exposition only template<ranges::input_range Range>
^
p906.cpp:31:25: error: use of undeclared identifier 'ranges'
remove_const_t<typename ranges::range_value_t<Range>::first_type>; // exposition only template<ranges::input_range Range>
                        ^
p906.cpp:31:65: error: expected ';' after alias declaration
remove_const_t<typename ranges::range_value_t<Range>::first_type>; // exposition only template<ranges::input_range Range>
                                                                ^
                                                                ;
p906.cpp:32:7: error: using declaration requires a qualified name
using range-mapped-type = typename ranges::range_value_t<Range>::second_type; // exposition only template<ranges::input_range Range>
      ^
p906.cpp:32:12: error: expected ';' after using declaration
using range-mapped-type = typename ranges::range_value_t<Range>::second_type; // exposition only template<ranges::input_range Range>
           ^
           ;
p906.cpp:33:7: error: using declaration requires a qualified name
using range-to-alloc-type =
      ^
p906.cpp:33:12: error: expected ';' after using declaration
using range-to-alloc-type =
           ^
           ;
p906.cpp:42:59: error: a space is required between consecutive right angle brackets (use '> >')
             class Allocator = allocator<pair<const Key, T>>>
                                                          ^~
                                                          > > 
p906.cpp:41:46: error: template parameter redefines default argument
template<class Key, class T, class Compare = less<Key>,
                                             ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_map.h:98:62: note: previous default template argument defined here
  template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
                                                             ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
$ clang++ p906.cpp -std=2b -o p906l -I. -Wall
p906.cpp:24:31: error: cannot template a using declaration
template<class InputIterator> using iter-mapped-type =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
p906.cpp:24:41: error: expected external declaration
template<class InputIterator> using iter-mapped-type =
                                        ^
p906.cpp:24:42: error: unknown type name 'mapped'
template<class InputIterator> using iter-mapped-type =
                                         ^
p906.cpp:24:48: error: expected unqualified-id
template<class InputIterator> using iter-mapped-type =
                                               ^
p906.cpp:28:1: error: cannot template a using declaration
using iter-to-alloc-type = pair<
^
p906.cpp:28:11: error: expected external declaration
using iter-to-alloc-type = pair<
          ^
p906.cpp:28:12: error: unknown type name 'to'
using iter-to-alloc-type = pair<
           ^
p906.cpp:28:14: error: expected unqualified-id
using iter-to-alloc-type = pair<
             ^
p906.cpp:32:7: error: using declaration requires a qualified name
using range-mapped-type = typename ranges::range_value_t<Range>::second_type; // exposition only template<ranges::input_range Range>
      ^
p906.cpp:32:12: error: expected ';' after using declaration
using range-mapped-type = typename ranges::range_value_t<Range>::second_type; // exposition only template<ranges::input_range Range>
           ^
           ;
p906.cpp:33:7: error: using declaration requires a qualified name
using range-to-alloc-type =
      ^
p906.cpp:33:12: error: expected ';' after using declaration
using range-to-alloc-type =
           ^
           ;
p906.cpp:41:46: error: template parameter redefines default argument
template<class Key, class T, class Compare = less<Key>,
                                             ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_map.h:98:62: note: previous default template argument defined here
  template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
                                                             ^
p906.cpp:42:32: error: template parameter redefines default argument
             class Allocator = allocator<pair<const Key, T>>>
                               ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_map.h:99:24: note: previous default template argument defined here
            typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
                              ^
p906.cpp:48:1: error: no template named 'synth_three_way_result'; did you mean 'compare_three_way_result'?
synth_three_way_result<pair<const Key, T>> operator<=>(const map<Key, T, Compare, Allocator>& x,
^~~~~~~~~~~~~~~~~~~~~~
compare_three_way_result
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/compare:470:12: note: 'compare_three_way_result' declared here
    struct compare_three_way_result
           ^
p906.cpp:59:46: error: template parameter redefines default argument
template<class Key, class T, class Compare = less<Key>,
                                             ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_multimap.h:97:26: note: previous default template argument defined here
            typename _Compare = std::less<_Key>,
                                ^
p906.cpp:60:28: error: template parameter redefines default argument
         class Allocator = allocator<pair<const Key, T>>>
                           ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_multimap.h:98:24: note: previous default template argument defined here
            typename _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
                              ^
p906.cpp:66:1: error: no template named 'synth_three_way_result'; did you mean 'compare_three_way_result'?
synth_three_way_result<pair<const Key, T>>
^~~~~~~~~~~~~~~~~~~~~~
compare_three_way_result
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/compare:470:12: note: 'compare_three_way_result' declared here
    struct compare_three_way_result
           ^
p906.cpp:77:52: error: template parameter redefines default argument
      template<class Key, class T, class Compare = less<Key>>
                                                   ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/map:77:59: note: previous default template argument defined here
    template<typename _Key, typename _Tp, typename _Cmp = std::less<_Key>>
                                                          ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

$ g++ p906.cpp -std=03 -o p906g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
                 from N4910.h:11,
                 from p906.cpp:10:
/usr/local/include/c++/12.1.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
   32 | #error This file requires compiler and library support \
      |  ^~~~~
p906.cpp:53:9: warning: identifier 'noexcept' is a keyword in C++11 [-Wc++11-compat]
   53 |         noexcept(noexcept(x.swap(y)));
      |         ^~~~~~~~
p906.cpp:19:31: error: expected unqualified-id before 'using'
   19 | template<class InputIterator> using iter_value_type =
      |                               ^~~~~
p906.cpp:22:1: error: expected unqualified-id before 'using'
   22 | using iter_key_type = remove_const_t<
      | ^~~~~
p906.cpp:24:31: error: expected unqualified-id before 'using'
   24 | template<class InputIterator> using iter-mapped-type =
      |                               ^~~~~
p906.cpp:28:1: error: expected unqualified-id before 'using'
   28 | using iter-to-alloc-type = pair<
      | ^~~~~
p906.cpp:30:10: error: 'ranges' has not been declared
   30 | template<ranges::input_range Range> using range_key_type =
      |          ^~~~~~
p906.cpp:30:30: error: expected '>' before 'Range'
   30 | template<ranges::input_range Range> using range_key_type =
      |                              ^~~~~
p906.cpp:30:37: error: expected unqualified-id before 'using'
   30 | template<ranges::input_range Range> using range_key_type =
      |                                     ^~~~~
p906.cpp:32:7: error: expected nested-name-specifier before 'range'
   32 | using range-mapped-type = typename ranges::range_value_t<Range>::second_type; // exposition only template<ranges::input_range Range>
      |       ^~~~~
p906.cpp:33:7: error: expected nested-name-specifier before 'range'
   33 | using range-to-alloc-type =
      |       ^~~~~
p906.cpp:42:59: error: '>>' should be '> >' within a nested template argument list
   42 |              class Allocator = allocator<pair<const Key, T>>>
      |                                                           ^~
      |                                                           > >
p906.cpp:41:30: error: redefinition of default argument for 'class Compare'
   41 | template<class Key, class T, class Compare = less<Key>,
      |                              ^~~~~
In file included from /usr/local/include/c++/12.1.0/map:61,
                 from N4910.h:10:
/usr/local/include/c++/12.1.0/bits/stl_map.h:98:42: note: original definition appeared here
   98 |   template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
      |                                          ^~~~~~~~
p906.cpp:48:1: error: 'synth_three_way_result' does not name a type
   48 | synth_three_way_result<pair<const Key, T>> operator<=>(const map<Key, T, Compare, Allocator>& x,
      | ^~~~~~~~~~~~~~~~~~~~~~
p906.cpp:53:9: error: expected initializer before 'noexcept'
   53 |         noexcept(noexcept(x.swap(y)));
      |         ^~~~~~~~
p906.cpp:60:55: error: '>>' should be '> >' within a nested template argument list
   60 |          class Allocator = allocator<pair<const Key, T>>>
      |                                                       ^~
      |                                                       > >
p906.cpp:59:30: error: redefinition of default argument for 'class Compare'
   59 | template<class Key, class T, class Compare = less<Key>,
      |                              ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:71:42: note: original definition appeared here
   71 |   template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      |                                          ^~~~~~~~
p906.cpp:66:1: error: 'synth_three_way_result' does not name a type
   66 | synth_three_way_result<pair<const Key, T>>
      | ^~~~~~~~~~~~~~~~~~~~~~
p906.cpp:72:9: error: expected initializer before 'noexcept'
   72 |         noexcept(noexcept(x.swap(y)));
      |         ^~~~~~~~
p906.cpp:77:60: error: spurious '>>', use '>' to terminate a template argument list
   77 |       template<class Key, class T, class Compare = less<Key>>
      |                                                            ^~
p906.cpp:78:9: error: expected '>' before 'using'
   78 |         using map = std::map<Key, T, Compare,
      |         ^~~~~
p906.cpp:79:72: error: expected unqualified-id before ';' token
   79 |                              polymorphic_allocator<pair<const Key, T>>>;
      |                                                                        ^
p906.cpp:80:60: error: spurious '>>', use '>' to terminate a template argument list
   80 |       template<class Key, class T, class Compare = less<Key>>
      |                                                            ^~
p906.cpp:81:9: error: expected '>' before 'using'
   81 |         using multimap = std::multimap<Key, T, Compare,
      |         ^~~~~
p906.cpp:82:82: error: expected unqualified-id before ';' token
   82 |                                        polymorphic_allocator<pair<const Key, T>>>;
      |                                                                                  ^
p906.cpp:89:79: error: spurious '>>', use '>' to terminate a template argument list
   89 | template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                                                                               ^~
p906.cpp:89:66: error: two or more data types in declaration of 'type name'
   89 | template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                                                                  ^~~~~~~~~~~~~~~
p906.cpp:90:10: error: expected '>' before ';' token
   90 | class set;
      |          ^
p906.cpp:90:10: error: expected unqualified-id before ';' token
p906.cpp:92:29: error: 'std::set' is not a template
   92 |       bool operator==(const set<Key, Compare, Allocator>& x,
      |                             ^~~
p906.cpp:93:29: error: 'std::set' is not a template
   93 |                       const set<Key, Compare, Allocator>& y);
      |                             ^~~
p906.cpp:95:1: error: 'synth_three_way_result' does not name a type
   95 | synth_three_way_result<Key> operator<=>(const set<Key, Compare, Allocator>& x, const set<Key, Compare, Allocator>& y);
      | ^~~~~~~~~~~~~~~~~~~~~~
p906.cpp:97:17: error: 'std::set' is not a template
   97 |       void swap(set<Key, Compare, Allocator>& x,
      |                 ^~~
p906.cpp:98:17: error: 'std::set' is not a template
   98 |                 set<Key, Compare, Allocator>& y)
      |                 ^~~
p906.cpp:99:9: error: expected initializer before 'noexcept'
   99 |         noexcept(noexcept(x.swap(y)));
      |         ^~~~~~~~
p906.cpp:101:16: error: expected nested-name-specifier before 'set'
  101 |       typename set<Key, Compare, Allocator>::size_type
      |                ^~~
p906.cpp:101:19: error: expected initializer before '<' token
  101 |       typename set<Key, Compare, Allocator>::size_type
      |                   ^
p906.cpp:104:79: error: spurious '>>', use '>' to terminate a template argument list
  104 | template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                                                                               ^~
p906.cpp:104:66: error: two or more data types in declaration of 'type name'
  104 | template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                                                                  ^~~~~~~~~~~~~~~
p906.cpp:105:21: error: expected '>' before ';' token
  105 |       class multiset;
      |                     ^
p906.cpp:105:21: error: expected unqualified-id before ';' token
p906.cpp:107:29: error: 'std::multiset' is not a template
  107 |       bool operator==(const multiset<Key, Compare, Allocator>& x,
      |                             ^~~~~~~~
p906.cpp:108:29: error: 'std::multiset' is not a template
  108 |                       const multiset<Key, Compare, Allocator>& y);
      |                             ^~~~~~~~
p906.cpp:110:1: error: 'synth_three_way_result' does not name a type
  110 | synth_three_way_result<Key> operator<=>(const multiset<Key, Compare, Allocator>& x, const multiset<Key, Compare, Allocator>& y);
      | ^~~~~~~~~~~~~~~~~~~~~~
p906.cpp:112:15: error: 'std::multiset' is not a template
  112 |     void swap(multiset<Key, Compare, Allocator>& x,
      |               ^~~~~~~~
p906.cpp:113:15: error: 'std::multiset' is not a template
  113 |               multiset<Key, Compare, Allocator>& y)
      |               ^~~~~~~~
p906.cpp:114:7: error: expected initializer before 'noexcept'
  114 |       noexcept(noexcept(x.swap(y)));
      |       ^~~~~~~~
p906.cpp:116:14: error: expected nested-name-specifier before 'multiset'
  116 |     typename multiset<Key, Compare, Allocator>::size_type
      |              ^~~~~~~~
p906.cpp:116:22: error: expected initializer before '<' token
  116 |     typename multiset<Key, Compare, Allocator>::size_type
      |                      ^
p906.cpp:119:49: error: spurious '>>', use '>' to terminate a template argument list
  119 |     template<class Key, class Compare = less<Key>>
      |                                                 ^~
p906.cpp:120:7: error: expected '>' before 'using'
  120 |       using set = std::set<Key, Compare, polymorphic_allocator<Key>>;
      |       ^~~~~
p906.cpp:120:69: error: expected unqualified-id before ';' token
  120 |       using set = std::set<Key, Compare, polymorphic_allocator<Key>>;
      |                                                                     ^
p906.cpp:121:49: error: spurious '>>', use '>' to terminate a template argument list
  121 |     template<class Key, class Compare = less<Key>>
      |                                                 ^~
p906.cpp:122:7: error: expected '>' before 'using'
  122 |       using multiset = std::multiset<Key, Compare, polymorphic_allocator<Key>>;
      |       ^~~~~
p906.cpp:122:79: error: expected unqualified-id before ';' token
  122 |       using multiset = std::multiset<Key, Compare, polymorphic_allocator<Key>>;
      |                                                                               ^
p906.cpp:130:62: error: '>>' should be '> >' within a nested template argument list
  130 |                 class Allocator = allocator<pair<const Key, T>>>
      |                                                              ^~
      |                                                              > >
p906.cpp:129:37: error: redefinition of default argument for 'class Compare'
  129 |        template<class Key, class T, class Compare = less<Key>,
      |                                     ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:98:42: note: original definition appeared here
   98 |   template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
      |                                          ^~~~~~~~
p906.cpp:291:52: error: 'iter' was not declared in this scope
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                    ^~~~
p906.cpp:291:57: error: 'key' was not declared in this scope
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                         ^~~
p906.cpp:291:61: error: 'type' was not declared in this scope; did you mean 'ctype'?
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                             ^~~~
      |                                                             ctype
p906.cpp:293:89: error: wrong number of template arguments (2, should be 1)
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                                                                         ^
In file included from /usr/local/include/c++/12.1.0/string:48,
                 from /usr/local/include/c++/12.1.0/bits/locale_classes.h:40,
                 from /usr/local/include/c++/12.1.0/bits/ios_base.h:41,
                 from /usr/local/include/c++/12.1.0/ios:42,
                 from /usr/local/include/c++/12.1.0/ostream:38,
                 from /usr/local/include/c++/12.1.0/iostream:39,
                 from N4910.h:2:
/usr/local/include/c++/12.1.0/bits/stl_function.h:403:12: note: provided for 'template<class _Tp> struct std::less'
  403 |     struct less : public binary_function<_Tp, _Tp, bool>
      |            ^~~~
p906.cpp:293:90: error: expected '>' before ';' token
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                                                                          ^
p906.cpp:293:90: error: expected unqualified-id before ';' token
p906.cpp:294:10: error: 'ranges' has not been declared
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |          ^~~~~~
p906.cpp:294:30: error: expected '>' before 'R'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                              ^
p906.cpp:296:68: error: expected unqualified-id before ';' token
  296 | -> map<range_key_type<R>, range-mapped-type<R>, Compare, Allocator>;
      |                                                                    ^
p906.cpp:298:59: error: '>>' should be '> >' within a nested template argument list
  298 |              class Allocator = allocator<pair<const Key, T>>>
      |                                                           ^~
      |                                                           > >
p906.cpp:299:10: error: expected constructor, destructor, or type conversion before '(' token
  299 |       map(initializer_list<pair<Key, T>>, Compare = Compare(), Allocator = Allocator())
      |          ^
p906.cpp:303:8: error: 'iter_key_type' was not declared in this scope
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |        ^~~~~~~~~~~~~
p906.cpp:303:35: error: wrong number of template arguments (1, should be at least 2)
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                   ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:100:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  100 |     class map
      |           ^~~
p906.cpp:303:8: error: 'iter_key_type' was not declared in this scope
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |        ^~~~~~~~~~~~~
p906.cpp:303:35: error: wrong number of template arguments (1, should be at least 2)
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                   ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:100:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  100 |     class map
      |           ^~~
p906.cpp:303:8: error: 'iter_key_type' was not declared in this scope
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |        ^~~~~~~~~~~~~
p906.cpp:303:35: error: wrong number of template arguments (1, should be at least 2)
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                   ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:100:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  100 |     class map
      |           ^~~
p906.cpp:303:8: error: 'iter_key_type' was not declared in this scope
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |        ^~~~~~~~~~~~~
p906.cpp:303:35: error: wrong number of template arguments (1, should be at least 2)
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                   ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:100:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  100 |     class map
      |           ^~~
p906.cpp:303:4: error: invalid use of template-name 'std::map' without an argument list
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |    ^~~
p906.cpp:303:4: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_map.h:100:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map' declared here
  100 |     class map
      |           ^~~
p906.cpp:303:7: error: expected constructor, destructor, or type conversion before '<' token
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |       ^
p906.cpp:304:14: error: 'ranges' has not been declared
  304 |     template<ranges::input_range R, class Allocator>
      |              ^~~~~~
p906.cpp:304:34: error: expected '>' before 'R'
  304 |     template<ranges::input_range R, class Allocator>
      |                                  ^
p906.cpp:305:10: error: expected constructor, destructor, or type conversion before '(' token
  305 |       map(from_range_t, R&&, Allocator)
      |          ^
p906.cpp:308:10: error: expected constructor, destructor, or type conversion before '(' token
  308 |       map(initializer_list<pair<Key, T>>, Allocator) -> map<Key, T, less<Key>, Allocator>;
      |          ^
p906.cpp:311:20: error: 'Compare' does not name a type
  311 | explicit map(const Compare& comp, const Allocator& = Allocator());
      |                    ^~~~~~~
p906.cpp:311:64: error: invalid use of incomplete type 'class std::Allocator'
  311 | explicit map(const Compare& comp, const Allocator& = Allocator());
      |                                                                ^
p906.cpp:291:89: note: forward declaration of 'class std::Allocator'
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                                                         ^~~~~~~~~
p906.cpp:311:10: error: ISO C++ forbids declaration of 'map' with no type [-fpermissive]
  311 | explicit map(const Compare& comp, const Allocator& = Allocator());
      |          ^~~
p906.cpp:311:1: error: 'explicit' outside class declaration
  311 | explicit map(const Compare& comp, const Allocator& = Allocator());
      | ^~~~~~~~
p906.cpp:314:8: error: 'Compare' does not name a type
  314 |  const Compare& comp = Compare(), const Allocator& = Allocator());
      |        ^~~~~~~
p906.cpp:314:24: error: there are no arguments to 'Compare' that depend on a template parameter, so a declaration of 'Compare' must be available [-fpermissive]
  314 |  const Compare& comp = Compare(), const Allocator& = Allocator());
      |                        ^~~~~~~
p906.cpp:314:24: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
p906.cpp:314:66: error: expected constructor, destructor, or type conversion before ';' token
  314 |  const Compare& comp = Compare(), const Allocator& = Allocator());
      |                                                                  ^
p906.cpp:317:10: error: 'container_compatible_range' has not been declared
  317 | template<container_compatible_range<value_type> R>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:317:36: error: expected '>' before '<' token
  317 | template<container_compatible_range<value_type> R>
      |                                    ^
p906.cpp:318:4: error: expected constructor, destructor, or type conversion before '(' token
  318 | map(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
      |    ^
p906.cpp:322:1: error: 'mapped_type' does not name a type
  322 | mapped_type& operator[](const key_type& x);
      | ^~~~~~~~~~~
p906.cpp:325:7: error: 'mapped_type' does not name a type
  325 | const mapped_type& at(const key_type& x) const;
      |       ^~~~~~~~~~~
p906.cpp:330:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  330 |   pair<iterator, bool> insert(P&& x);
      |                      ^
p906.cpp:330:22: note:   expected a type, got 'iterator'
p906.cpp:330:32: error: expected ',' or '...' before '&&' token
  330 |   pair<iterator, bool> insert(P&& x);
      |                                ^~
p906.cpp:332:3: error: invalid use of template-name 'std::iterator' without an argument list
  332 |   iterator insert(const_iterator position, P&& x);
      |   ^~~~~~~~
p906.cpp:332:3: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
In file included from /usr/local/include/c++/12.1.0/string:45:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:335:15: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  335 | template<class... Args>
      |               ^~~
p906.cpp:336:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                      ^
p906.cpp:336:22: note:   expected a type, got 'iterator'
p906.cpp:336:42: error: 'key_type' does not name a type; did you mean 'key_t'?
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                                          ^~~~~~~~
      |                                          key_t
p906.cpp:336:59: error: expected ',' or '...' before '&&' token
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                                                           ^~
p906.cpp:336:69: error: parameter packs not expanded with '...':
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                                                                     ^
p906.cpp:336:69: note:         'Args'
p906.cpp:337:15: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  337 | template<class... Args>
      |               ^~~
p906.cpp:338:3: error: invalid use of template-name 'std::iterator' without an argument list
  338 |   iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
      |   ^~~~~~~~
p906.cpp:338:3: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:343:15: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  343 | template<class... Args>
      |               ^~~
p906.cpp:344:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                      ^
p906.cpp:344:22: note:   expected a type, got 'iterator'
p906.cpp:344:36: error: 'template<class ... Args> int try_emplace' conflicts with a previous declaration
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                    ^~~~~~~~
p906.cpp:336:24: note: previous declaration 'int try_emplace(const int&, <type error>)'
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                        ^~~~~~~~~~~
p906.cpp:344:36: error: 'key_type' was not declared in this scope; did you mean 'key_t'?
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                    ^~~~~~~~
      |                                    key_t
p906.cpp:344:47: error: 'k' was not declared in this scope
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                               ^
p906.cpp:344:54: error: expected primary-expression before '&&' token
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                                      ^~
p906.cpp:344:64: error: expression list treated as compound expression in initializer [-fpermissive]
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                                                ^
p906.cpp:344:24: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                        ^~~~~~~~~~~
p906.cpp:345:15: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  345 | template<class... Args>
      |               ^~~
p906.cpp:346:3: error: invalid use of template-name 'std::iterator' without an argument list
  346 |   iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
      |   ^~~~~~~~
p906.cpp:346:3: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:352:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |                      ^
p906.cpp:352:22: note:   expected a type, got 'iterator'
p906.cpp:352:47: error: 'key_type' does not name a type; did you mean 'key_t'?
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |                                               ^~~~~~~~
      |                                               key_t
p906.cpp:352:61: error: expected ',' or '...' before '&&' token
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |                                                             ^~
p906.cpp:354:3: error: invalid use of template-name 'std::iterator' without an argument list
  354 |   iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
      |   ^~~~~~~~
p906.cpp:354:3: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:361:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                      ^
p906.cpp:361:22: note:   expected a type, got 'iterator'
p906.cpp:361:41: error: 'template<class M> int insert_or_assign' conflicts with a previous declaration
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                         ^~~~~~~~
p906.cpp:352:24: note: previous declaration 'int insert_or_assign(const int&, M)'
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |                        ^~~~~~~~~~~~~~~~
p906.cpp:361:41: error: 'key_type' was not declared in this scope; did you mean 'key_t'?
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                         ^~~~~~~~
      |                                         key_t
p906.cpp:361:52: error: 'k' was not declared in this scope
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                                    ^
p906.cpp:361:56: error: expected primary-expression before '&&' token
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                                        ^~
p906.cpp:361:59: error: 'obj' was not declared in this scope
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                                           ^~~
p906.cpp:361:62: error: expression list treated as compound expression in initializer [-fpermissive]
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                                              ^
p906.cpp:361:24: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                        ^~~~~~~~~~~~~~~~
p906.cpp:363:3: error: invalid use of template-name 'std::iterator' without an argument list
  363 |   iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
      |   ^~~~~~~~
p906.cpp:363:3: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:371:14: error: reference to 'map' is ambiguous
  371 |     erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
      |              ^~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:100:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  100 |     class map
      |           ^~~
p906.cpp:311:10: note:                 'int map(const int&, const std::Allocator&)'
  311 | explicit map(const Compare& comp, const Allocator& = Allocator());
      |          ^~~
p906.cpp:371:21: error: expected primary-expression before ',' token
  371 |     erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
      |                     ^
p906.cpp:371:24: error: expected primary-expression before ',' token
  371 |     erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
      |                        ^
p906.cpp:371:33: error: expected primary-expression before ',' token
  371 |     erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
      |                                 ^
p906.cpp:371:44: error: expected primary-expression before '>' token
  371 |     erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
      |                                            ^
p906.cpp:371:47: error: 'c' was not declared in this scope
  371 |     erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
      |                                               ^
p906.cpp:371:60: error: expected primary-expression before 'pred'
  371 |     erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
      |                                                            ^~~~
p906.cpp:371:5: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  371 |     erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
      |     ^~~~~~~~
p906.cpp:373:8: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
  373 |        auto original_size = c.size();
      |        ^~~~
      |        ----
p906.cpp:373:13: error: 'original_size' does not name a type
  373 |        auto original_size = c.size();
      |             ^~~~~~~~~~~~~
p906.cpp:374:8: error: expected unqualified-id before 'for'
  374 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |        ^~~
p906.cpp:374:49: error: 'i' does not name a type
  374 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                 ^
p906.cpp:374:60: error: expected unqualified-id before ')' token
  374 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                            ^
p906.cpp:379:8: error: expected unqualified-id before 'return'
  379 |        return original_size - c.size();
      |        ^~~~~~
p906.cpp:386:59: error: '>>' should be '> >' within a nested template argument list
  386 |              class Allocator = allocator<pair<const Key, T>>>
      |                                                           ^~
      |                                                           > >
p906.cpp:385:34: error: redefinition of default argument for 'class Compare'
  385 |     template<class Key, class T, class Compare = less<Key>,
      |                                  ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:71:42: note: original definition appeared here
   71 |   template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      |                                          ^~~~~~~~
p906.cpp:414:1: error: ISO C++ forbids declaration of 'multimap' with no type [-fpermissive]
  414 | multimap() : multimap(Compare()) { }
      | ^~~~~~~~
p906.cpp:414:10: error: 'int std::multimap()' redeclared as different kind of entity
  414 | multimap() : multimap(Compare()) { }
      |          ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: previous declaration 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap'
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp: In function 'int std::multimap()':
p906.cpp:414:14: error: only constructors take member initializers
  414 | multimap() : multimap(Compare()) { }
      |              ^~~~~~~~
p906.cpp:414:23: error: 'Compare' was not declared in this scope
  414 | multimap() : multimap(Compare()) { }
      |                       ^~~~~~~
p906.cpp:414:36: warning: no return statement in function returning non-void [-Wreturn-type]
  414 | multimap() : multimap(Compare()) { }
      |                                    ^
p906.cpp: At global scope:
p906.cpp:415:25: error: 'Compare' does not name a type
  415 | explicit multimap(const Compare& comp, const Allocator& = Allocator()); template<class InputIterator>
      |                         ^~~~~~~
p906.cpp:415:69: error: invalid use of incomplete type 'class std::Allocator'
  415 | explicit multimap(const Compare& comp, const Allocator& = Allocator()); template<class InputIterator>
      |                                                                     ^
p906.cpp:291:89: note: forward declaration of 'class std::Allocator'
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                                                         ^~~~~~~~~
p906.cpp:415:10: error: ISO C++ forbids declaration of 'multimap' with no type [-fpermissive]
  415 | explicit multimap(const Compare& comp, const Allocator& = Allocator()); template<class InputIterator>
      |          ^~~~~~~~
p906.cpp:415:1: error: 'explicit' outside class declaration
  415 | explicit multimap(const Compare& comp, const Allocator& = Allocator()); template<class InputIterator>
      | ^~~~~~~~
p906.cpp:415:70: error: 'int std::multimap(const int&, const Allocator&)' redeclared as different kind of entity
  415 | explicit multimap(const Compare& comp, const Allocator& = Allocator()); template<class InputIterator>
      |                                                                      ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: previous declaration 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap'
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:417:18: error: 'Compare' does not name a type
  417 |            const Compare& comp = Compare(),
      |                  ^~~~~~~
p906.cpp:417:34: error: there are no arguments to 'Compare' that depend on a template parameter, so a declaration of 'Compare' must be available [-fpermissive]
  417 |            const Compare& comp = Compare(),
      |                                  ^~~~~~~
p906.cpp:418:32: error: expected constructor, destructor, or type conversion before ';' token
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                ^
p906.cpp:418:43: error: 'container_compatible_range' has not been declared
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:418:69: error: expected '>' before '<' token
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                                                     ^
p906.cpp:419:11: error: expected constructor, destructor, or type conversion before '(' token
  419 |   multimap(from_range_t, R&& rg,
      |           ^
p906.cpp:421:16: error: invalid use of template-name 'std::multimap' without an argument list
  421 | multimap(const multimap& x);
      |                ^~~~~~~~
p906.cpp:421:16: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:421:28: error: expected constructor, destructor, or type conversion before ';' token
  421 | multimap(const multimap& x);
      |                            ^
p906.cpp:422:9: error: expected constructor, destructor, or type conversion before '(' token
  422 | multimap(multimap&& x);
      |         ^
p906.cpp:423:10: error: ISO C++ forbids declaration of 'multimap' with no type [-fpermissive]
  423 | explicit multimap(const Allocator&);
      |          ^~~~~~~~
p906.cpp:423:1: error: 'explicit' outside class declaration
  423 | explicit multimap(const Allocator&);
      | ^~~~~~~~
p906.cpp:423:35: error: 'int std::multimap(const Allocator&)' redeclared as different kind of entity
  423 | explicit multimap(const Allocator&);
      |                                   ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: previous declaration 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap'
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:424:16: error: invalid use of template-name 'std::multimap' without an argument list
  424 | multimap(const multimap&, const type_identity_t<Allocator>&);
      |                ^~~~~~~~
p906.cpp:424:16: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:424:33: error: 'type_identity_t' does not name a type
  424 | multimap(const multimap&, const type_identity_t<Allocator>&);
      |                                 ^~~~~~~~~~~~~~~
p906.cpp:424:48: error: expected ',' or '...' before '<' token
  424 | multimap(const multimap&, const type_identity_t<Allocator>&);
      |                                                ^
p906.cpp:424:61: error: expected constructor, destructor, or type conversion before ';' token
  424 | multimap(const multimap&, const type_identity_t<Allocator>&);
      |                                                             ^
p906.cpp:425:9: error: expected constructor, destructor, or type conversion before '(' token
  425 | multimap(multimap&&, const type_identity_t<Allocator>&);
      |         ^
p906.cpp:426:9: error: expected constructor, destructor, or type conversion before '(' token
  426 | multimap(initializer_list<value_type>,
      |         ^
p906.cpp:430:3: error: ISO C++ forbids declaration of 'multimap' with no type [-fpermissive]
  430 |   multimap(InputIterator first, InputIterator last, const Allocator& a)
      |   ^~~~~~~~
p906.cpp:430:3: error: conflicting declaration of template 'template<class InputIterator> int std::multimap(InputIterator, InputIterator, const Allocator&)'
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: previous declaration 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap'
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:432:10: error: 'container_compatible_range' has not been declared
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:432:36: error: expected '>' before '<' token
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                    ^
p906.cpp:432:60: error: expected constructor, destructor, or type conversion before '(' token
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                                            ^
p906.cpp:435:16: error: template argument required for 'class multimap'
  435 |   friend class multimap;
      |                ^~~~~~~~
p906.cpp:435:3: error: friend declaration does not name a class or function
  435 |   friend class multimap;
      |   ^~~~~~
p906.cpp:436:10: error: 'initializer_list' has not been declared
  436 | multimap(initializer_list<value_type> il, const Allocator& a)
      |          ^~~~~~~~~~~~~~~~
p906.cpp:436:26: error: expected ',' or '...' before '<' token
  436 | multimap(initializer_list<value_type> il, const Allocator& a)
      |                          ^
p906.cpp:436:1: error: ISO C++ forbids declaration of 'multimap' with no type [-fpermissive]
  436 | multimap(initializer_list<value_type> il, const Allocator& a)
      | ^~~~~~~~
p906.cpp:438:10: error: expected class-name before '(' token
  438 | ~multimap();
      |          ^
p906.cpp:439:1: error: 'multimap' does not name a type
  439 | multimap& operator=(const multimap& x); multimap& operator=(multimap&& x)
      | ^~~~~~~~
p906.cpp:439:41: error: 'multimap' does not name a type
  439 | multimap& operator=(const multimap& x); multimap& operator=(multimap&& x)
      |                                         ^~~~~~~~
p906.cpp:442:1: error: 'multimap' does not name a type
  442 | multimap& operator=(initializer_list<value_type>);
      | ^~~~~~~~
p906.cpp:443:1: error: 'allocator_type' does not name a type; did you mean 'allocator'?
  443 | allocator_type get_allocator() const noexcept;
      | ^~~~~~~~~~~~~~
      | allocator
p906.cpp:445:1: error: invalid use of template-name 'std::iterator' without an argument list
  445 | iterator begin() noexcept;
      | ^~~~~~~~
p906.cpp:445:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:446:1: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  446 | const_iterator begin() const noexcept;
      | ^~~~~~~~~~~~~~
      | insert_iterator
p906.cpp:447:1: error: invalid use of template-name 'std::iterator' without an argument list
  447 | iterator end() noexcept;
      | ^~~~~~~~
p906.cpp:447:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:448:1: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  448 | const_iterator end() const noexcept;
      | ^~~~~~~~~~~~~~
      | insert_iterator
p906.cpp:449:1: error: invalid use of template-name 'std::reverse_iterator' without an argument list
  449 | reverse_iterator rbegin() noexcept;
      | ^~~~~~~~~~~~~~~~
p906.cpp:449:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
In file included from /usr/local/include/c++/12.1.0/string:47:
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:132:11: note: 'template<class _Iterator> class std::reverse_iterator' declared here
  132 |     class reverse_iterator
      |           ^~~~~~~~~~~~~~~~
p906.cpp:450:1: error: 'const_reverse_iterator' does not name a type; did you mean 'reverse_iterator'?
  450 | const_reverse_iterator rbegin() const noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~
      | reverse_iterator
p906.cpp:451:1: error: invalid use of template-name 'std::reverse_iterator' without an argument list
  451 | reverse_iterator       rend() noexcept;
      | ^~~~~~~~~~~~~~~~
p906.cpp:451:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:132:11: note: 'template<class _Iterator> class std::reverse_iterator' declared here
  132 |     class reverse_iterator
      |           ^~~~~~~~~~~~~~~~
p906.cpp:452:1: error: 'const_reverse_iterator' does not name a type; did you mean 'reverse_iterator'?
  452 | const_reverse_iterator rend() const noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~
      | reverse_iterator
p906.cpp:453:1: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  453 | const_iterator         cbegin() const noexcept;
      | ^~~~~~~~~~~~~~
      | insert_iterator
p906.cpp:454:1: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  454 | const_iterator         cend() const noexcept;
      | ^~~~~~~~~~~~~~
      | insert_iterator
p906.cpp:455:1: error: 'const_reverse_iterator' does not name a type; did you mean 'reverse_iterator'?
  455 | const_reverse_iterator crbegin() const noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~
      | reverse_iterator
p906.cpp:456:1: error: 'const_reverse_iterator' does not name a type; did you mean 'reverse_iterator'?
  456 | const_reverse_iterator crend() const noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~
      | reverse_iterator
p906.cpp:458:1: error: expected unqualified-id before '[' token
  458 | [[nodiscard]] bool empty() const noexcept;
      | ^
p906.cpp:459:1: error: 'size_type' does not name a type; did you mean 'size_t'?
  459 | size_type size() const noexcept;
      | ^~~~~~~~~
      | size_t
p906.cpp:460:1: error: 'size_type' does not name a type; did you mean 'size_t'?
  460 | size_type max_size() const noexcept;
      | ^~~~~~~~~
      | size_t
p906.cpp:462:15: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  462 | template<class... Args> iterator emplace(Args&&... args);
      |               ^~~
p906.cpp:462:25: error: invalid use of template-name 'std::iterator' without an argument list
  462 | template<class... Args> iterator emplace(Args&&... args);
      |                         ^~~~~~~~
p906.cpp:462:25: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:463:15: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  463 | template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args); iterator insert(const value_type& x);
      |               ^~~
p906.cpp:463:25: error: invalid use of template-name 'std::iterator' without an argument list
  463 | template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args); iterator insert(const value_type& x);
      |                         ^~~~~~~~
p906.cpp:463:25: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:463:89: error: invalid use of template-name 'std::iterator' without an argument list
  463 | template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args); iterator insert(const value_type& x);
      |                                                                                         ^~~~~~~~
p906.cpp:463:89: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:464:1: error: invalid use of template-name 'std::iterator' without an argument list
  464 | iterator insert(value_type&& x);
      | ^~~~~~~~
p906.cpp:464:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:465:19: error: invalid use of template-name 'std::iterator' without an argument list
  465 | template<class P> iterator insert(P&& x);
      |                   ^~~~~~~~
p906.cpp:465:19: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:466:1: error: invalid use of template-name 'std::iterator' without an argument list
  466 | iterator insert(const_iterator position, const value_type& x);
      | ^~~~~~~~
p906.cpp:466:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:467:1: error: invalid use of template-name 'std::iterator' without an argument list
  467 | iterator insert(const_iterator position, value_type&& x);
      | ^~~~~~~~
p906.cpp:467:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:468:19: error: invalid use of template-name 'std::iterator' without an argument list
  468 | template<class P> iterator insert(const_iterator position, P&& x);
      |                   ^~~~~~~~
p906.cpp:468:19: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:470:64: error: 'container_compatible_range' has not been declared
  470 | void insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:470:90: error: expected '>' before '<' token
  470 | oid insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                                         ^

p906.cpp:471:21: error: 'R' has not been declared
  471 |   void insert_range(R&& rg);
      |                     ^
p906.cpp:471:22: error: expected ',' or '...' before '&&' token
  471 |   void insert_range(R&& rg);
      |                      ^~
p906.cpp:472:13: error: 'initializer_list' has not been declared
  472 | void insert(initializer_list<value_type>);
      |             ^~~~~~~~~~~~~~~~
p906.cpp:472:29: error: expected ',' or '...' before '<' token
  472 | void insert(initializer_list<value_type>);
      |                             ^
p906.cpp:473:1: error: 'node_type' does not name a type
  473 | node_type extract(const_iterator position);
      | ^~~~~~~~~
p906.cpp:474:1: error: 'node_type' does not name a type
  474 | node_type extract(const key_type& x);
      | ^~~~~~~~~
p906.cpp:475:19: error: 'node_type' does not name a type
  475 | template<class K> node_type extract(K&& x);
      |                   ^~~~~~~~~
p906.cpp:476:1: error: invalid use of template-name 'std::iterator' without an argument list
  476 | iterator insert(node_type&& nh);
      | ^~~~~~~~
p906.cpp:476:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:477:1: error: invalid use of template-name 'std::iterator' without an argument list
  477 | iterator insert(const_iterator hint, node_type&& nh);
      | ^~~~~~~~
p906.cpp:477:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:478:1: error: invalid use of template-name 'std::iterator' without an argument list
  478 | iterator  erase(iterator position);
      | ^~~~~~~~
p906.cpp:478:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:479:1: error: invalid use of template-name 'std::iterator' without an argument list
  479 | iterator  erase(const_iterator position);
      | ^~~~~~~~
p906.cpp:479:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:480:1: error: 'size_type' does not name a type; did you mean 'size_t'?
  480 | size_type erase(const key_type& x);
      | ^~~~~~~~~
      | size_t
p906.cpp:481:19: error: 'size_type' does not name a type; did you mean 'size_t'?
  481 | template<class K> size_type erase(K&& x);
      |                   ^~~~~~~~~
      |                   size_t
p906.cpp:482:1: error: invalid use of template-name 'std::iterator' without an argument list
  482 | iterator  erase(const_iterator first, const_iterator last);
      | ^~~~~~~~
p906.cpp:482:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:483:16: error: 'multimap' is not a type
  483 | void      swap(multimap&)
      |                ^~~~~~~~
p906.cpp:483:25: error: expected ';' at end of member declaration
  483 | void      swap(multimap&)
      |                         ^
      |                          ;
p906.cpp:484:12: error: 'allocator_traits' has not been declared
  484 |   noexcept(allocator_traits<Allocator>::is_always_equal::value &&
      |            ^~~~~~~~~~~~~~~~
p906.cpp:484:28: error: expected ',' or '...' before '<' token
  484 |   noexcept(allocator_traits<Allocator>::is_always_equal::value &&
      |                            ^
p906.cpp:484:3: error: ISO C++ forbids declaration of 'noexcept' with no type [-fpermissive]
  484 |   noexcept(allocator_traits<Allocator>::is_always_equal::value &&
      |   ^~~~~~~~
p906.cpp:486:17: error: expected ';' at end of member declaration
  486 | void      clear() noexcept;
      |                 ^
      |                  ;
p906.cpp:486:19: error: 'noexcept' does not name a type
  486 | void      clear() noexcept;
      |                   ^~~~~~~~
p906.cpp:486:19: note: C++11 'noexcept' only available with '-std=c++11' or '-std=gnu++11'
p906.cpp:488:14: error: 'multimap' is not a type
  488 |   void merge(multimap<Key, T, C2, Allocator>& source);
      |              ^~~~~~~~
p906.cpp:488:22: error: expected ',' or '...' before '<' token
  488 |   void merge(multimap<Key, T, C2, Allocator>& source);
      |                      ^
p906.cpp:490:14: error: 'multimap' is not a type
  490 |   void merge(multimap<Key, T, C2, Allocator>&& source);
      |              ^~~~~~~~
p906.cpp:490:22: error: expected ',' or '...' before '<' token
  490 |   void merge(multimap<Key, T, C2, Allocator>&& source);
      |                      ^
p906.cpp:490:8: error: 'template<class C2> void std::value_compare::merge(int)' cannot be overloaded with 'template<class C2> void std::value_compare::merge(int)'
  490 |   void merge(multimap<Key, T, C2, Allocator>&& source);
      |        ^~~~~
p906.cpp:488:8: note: previous declaration 'template<class C2> void std::value_compare::merge(int)'
  488 |   void merge(multimap<Key, T, C2, Allocator>& source);
      |        ^~~~~
p906.cpp:492:18: error: 'Key' was not declared in this scope
  492 |   void merge(map<Key, T, C2, Allocator>& source);
      |                  ^~~
p906.cpp:492:23: error: 'T' was not declared in this scope
  492 |   void merge(map<Key, T, C2, Allocator>& source);
      |                       ^
p906.cpp:492:39: error: template argument 1 is invalid
  492 |   void merge(map<Key, T, C2, Allocator>& source);
      |                                       ^
p906.cpp:492:39: error: template argument 2 is invalid
p906.cpp:494:18: error: 'Key' was not declared in this scope
  494 |   void merge(map<Key, T, C2, Allocator>&& source);
      |                  ^~~
p906.cpp:494:23: error: 'T' was not declared in this scope
  494 |   void merge(map<Key, T, C2, Allocator>&& source);
      |                       ^
p906.cpp:494:39: error: template argument 1 is invalid
  494 |   void merge(map<Key, T, C2, Allocator>&& source);
      |                                       ^
p906.cpp:494:39: error: template argument 2 is invalid
p906.cpp:494:40: error: expected ',' or '...' before '&&' token
  494 |   void merge(map<Key, T, C2, Allocator>&& source);
      |                                        ^~
p906.cpp:494:8: error: 'template<class C2> void std::value_compare::merge(int)' cannot be overloaded with 'template<class C2> void std::value_compare::merge(int)'
  494 |   void merge(map<Key, T, C2, Allocator>&& source);
      |        ^~~~~
p906.cpp:488:8: note: previous declaration 'template<class C2> void std::value_compare::merge(int)'
  488 |   void merge(multimap<Key, T, C2, Allocator>& source);
      |        ^~~~~
p906.cpp:496:1: error: 'key_compare' does not name a type; did you mean 'value_compare'?
  496 | key_compare key_comp() const;
      | ^~~~~~~~~~~
      | value_compare
p906.cpp:499:1: error: invalid use of template-name 'std::iterator' without an argument list
  499 | iterator       find(const key_type& x);
      | ^~~~~~~~
p906.cpp:499:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:500:1: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  500 | const_iterator find(const key_type& x) const;
      | ^~~~~~~~~~~~~~
      | insert_iterator
p906.cpp:501:19: error: invalid use of template-name 'std::iterator' without an argument list
  501 | template<class K> iterator       find(const K& x);
      |                   ^~~~~~~~
p906.cpp:501:19: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:502:19: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  502 | template<class K> const_iterator find(const K& x) const;
      |                   ^~~~~~~~~~~~~~
      |                   insert_iterator
p906.cpp:503:1: error: 'size_type' does not name a type; did you mean 'size_t'?
  503 | size_type      count(const key_type& x) const;
      | ^~~~~~~~~
      | size_t
p906.cpp:504:19: error: 'size_type' does not name a type; did you mean 'size_t'?
  504 | template<class K> size_type count(const K& x) const;
      |                   ^~~~~~~~~
      |                   size_t
p906.cpp:505:31: error: 'key_type' does not name a type; did you mean 'key_t'?
  505 | bool           contains(const key_type& x) const;
      |                               ^~~~~~~~
      |                               key_t
p906.cpp:507:1: error: invalid use of template-name 'std::iterator' without an argument list
  507 | iterator       lower_bound(const key_type& x);
      | ^~~~~~~~
p906.cpp:507:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:508:1: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  508 | const_iterator lower_bound(const key_type& x) const;
      | ^~~~~~~~~~~~~~
      | insert_iterator
p906.cpp:509:19: error: invalid use of template-name 'std::iterator' without an argument list
  509 | template<class K> iterator       lower_bound(const K& x);
      |                   ^~~~~~~~
p906.cpp:509:19: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:510:19: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  510 | template<class K> const_iterator lower_bound(const K& x) const;
      |                   ^~~~~~~~~~~~~~
      |                   insert_iterator
p906.cpp:511:1: error: invalid use of template-name 'std::iterator' without an argument list
  511 | iterator       upper_bound(const key_type& x);
      | ^~~~~~~~
p906.cpp:511:1: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:512:1: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  512 | const_iterator upper_bound(const key_type& x) const;
      | ^~~~~~~~~~~~~~
      | insert_iterator
p906.cpp:513:19: error: invalid use of template-name 'std::iterator' without an argument list
  513 | template<class K> iterator       upper_bound(const K& x);
      |                   ^~~~~~~~
p906.cpp:513:19: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:514:19: error: 'const_iterator' does not name a type; did you mean 'insert_iterator'?
  514 | template<class K> const_iterator upper_bound(const K& x) const;
      |                   ^~~~~~~~~~~~~~
      |                   insert_iterator
p906.cpp:515:24: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  515 | pair<iterator, iterator>
      |                        ^
p906.cpp:515:24: note:   expected a type, got 'iterator'
p906.cpp:515:24: error: type/value mismatch at argument 2 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
p906.cpp:515:24: note:   expected a type, got 'iterator'
p906.cpp:516:6: error: 'const_iterator' was not declared in this scope; did you mean 'insert_iterator'?
  516 | pair<const_iterator, const_iterator>
      |      ^~~~~~~~~~~~~~
      |      insert_iterator
p906.cpp:516:22: error: 'const_iterator' was not declared in this scope; did you mean 'insert_iterator'?
  516 | pair<const_iterator, const_iterator>
      |                      ^~~~~~~~~~~~~~
      |                      insert_iterator
p906.cpp:516:36: error: template argument 1 is invalid
  516 | pair<const_iterator, const_iterator>
      |                                    ^
p906.cpp:516:36: error: template argument 2 is invalid
p906.cpp:521:19: error: 'key_type' does not name a type; did you mean 'key_t'?
  521 | equal_range(const key_type& x) const;
      |                   ^~~~~~~~
      |                   key_t
p906.cpp:521:1: error: ISO C++ forbids declaration of 'equal_range' with no type [-fpermissive]
  521 | equal_range(const key_type& x) const;
      | ^~~~~~~~~~~
p906.cpp:522:19: error: 'K' does not name a type
  522 | equal_range(const K& x);
      |                   ^
p906.cpp:522:1: error: ISO C++ forbids declaration of 'equal_range' with no type [-fpermissive]
  522 | equal_range(const K& x);
      | ^~~~~~~~~~~
p906.cpp:523:10: error: 'const_iterator' was not declared in this scope; did you mean 'insert_iterator'?
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |          ^~~~~~~~~~~~~~
      |          insert_iterator
p906.cpp:523:26: error: 'const_iterator' was not declared in this scope; did you mean 'insert_iterator'?
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |                          ^~~~~~~~~~~~~~
      |                          insert_iterator
p906.cpp:523:40: error: template argument 1 is invalid
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |                                        ^
p906.cpp:523:40: error: template argument 2 is invalid
p906.cpp:523:60: error: 'K' does not name a type
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |                                                            ^
p906.cpp:523:42: error: 'int std::value_compare::equal_range(const int&) const' cannot be overloaded with 'int std::value_compare::equal_range(const int&) const'
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |                                          ^~~~~~~~~~~
p906.cpp:521:1: note: previous declaration 'int std::value_compare::equal_range(const int&) const'
  521 | equal_range(const key_type& x) const;
      | ^~~~~~~~~~~
p906.cpp: In member function 'int std::value_compare::multimap(int)':
p906.cpp:437:5: error: only constructors take member initializers
  437 |   : multimap(il, Compare(), a) { }
      |     ^~~~~~~~
p906.cpp:437:5: error: class 'std::value_compare' does not have any field named 'multimap'
p906.cpp:437:14: error: 'il' was not declared in this scope
  437 |   : multimap(il, Compare(), a) { }
      |              ^~
p906.cpp:437:18: error: 'Compare' was not declared in this scope
  437 |   : multimap(il, Compare(), a) { }
      |                  ^~~~~~~
p906.cpp:437:29: error: 'a' was not declared in this scope
  437 |   : multimap(il, Compare(), a) { }
      |                             ^
p906.cpp:437:34: warning: no return statement in function returning non-void [-Wreturn-type]
  437 |   : multimap(il, Compare(), a) { }
      |                                  ^
p906.cpp: At global scope:
p906.cpp:525:52: error: 'iter_key_type' was not declared in this scope
  525 | template<class InputIterator, class Compare = less<iter_key_type<InputIterator>>, class Allocator = allocator<iter_to_alloc-type<InputIterator>>>
      |                                                    ^~~~~~~~~~~~~
p906.cpp:527:35: error: wrong number of template arguments (2, should be 1)
  527 |                 Compare, Allocator>;
      |                                   ^
/usr/local/include/c++/12.1.0/bits/stl_function.h:403:12: note: provided for 'template<class _Tp> struct std::less'
  403 |     struct less : public binary_function<_Tp, _Tp, bool>
      |            ^~~~
p906.cpp:527:36: error: expected '>' before ';' token
  527 |                 Compare, Allocator>;
      |                                    ^
p906.cpp:527:36: error: expected unqualified-id before ';' token
p906.cpp:528:10: error: 'ranges' has not been declared
  528 | template<ranges::input_range R, class Compare = less<range_key_type<R>>, class Allocator = allocator<range_to_alloc_type<R>>>
      |          ^~~~~~
p906.cpp:528:30: error: expected '>' before 'R'
  528 | template<ranges::input_range R, class Compare = less<range_key_type<R>>, class Allocator = allocator<range_to_alloc_type<R>>>
      |                              ^
p906.cpp:530:73: error: expected unqualified-id before ';' token
  530 | -> multimap<range_key_type<R>, range_mapped_type<R>, Compare, Allocator>;
      |                                                                         ^
p906.cpp:532:55: error: '>>' should be '> >' within a nested template argument list
  532 |          class Allocator = allocator<pair<const Key, T>>>
      |                                                       ^~
      |                                                       > >
p906.cpp:533:11: error: expected constructor, destructor, or type conversion before '(' token
  533 |   multimap(initializer_list<pair<Key, T>>, Compare = Compare(), Allocator = Allocator())
      |           ^
p906.cpp:537:13: error: 'iter_key_type' was not declared in this scope
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |             ^~~~~~~~~~~~~
p906.cpp:537:40: error: wrong number of template arguments (1, should be at least 2)
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                        ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap'
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:537:13: error: 'iter_key_type' was not declared in this scope
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |             ^~~~~~~~~~~~~
p906.cpp:537:40: error: wrong number of template arguments (1, should be at least 2)
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                        ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap'
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:537:13: error: 'iter_key_type' was not declared in this scope
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |             ^~~~~~~~~~~~~
p906.cpp:537:40: error: wrong number of template arguments (1, should be at least 2)
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                        ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap'
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:537:13: error: 'iter_key_type' was not declared in this scope
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |             ^~~~~~~~~~~~~
p906.cpp:537:40: error: wrong number of template arguments (1, should be at least 2)
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                        ^
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap'
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:537:4: error: invalid use of template-name 'std::multimap' without an argument list
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |    ^~~~~~~~
p906.cpp:537:4: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++1'
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:537:12: error: expected constructor, destructor, or type conversion before '<' token
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |            ^
p906.cpp:538:8: error: found ':' in nested-name-specifier, expected '::'
  538 | Effects: Constructs an empty multimap using the specified comparison object and allocator. Complexity: Constant.
      |        ^
      |        ::
p906.cpp:538:1: error: 'Effects' does not name a type
  538 | Effects: Constructs an empty multimap using the specified comparison object and allocator. Complexity: Constant.
      | ^~~~~~~
p906.cpp:543:15: error: expected constructor, destructor, or type conversion before '(' token
  543 |       multimap(initializer_list<pair<Key, T>>, Allocator)
      |               ^
p906.cpp:547:25: error: 'Compare' does not name a type
  547 | explicit multimap(const Compare& comp, const Allocator& = Allocator());
      |                         ^~~~~~~
p906.cpp:547:69: error: invalid use of incomplete type 'class std::Allocator'
  547 | explicit multimap(const Compare& comp, const Allocator& = Allocator());
      |                                                                     ^
p906.cpp:291:89: note: forward declaration of 'class std::Allocator'
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                                                         ^~~~~~~~~
p906.cpp:547:10: error: ISO C++ forbids declaration of 'multimap' with no type [-fpermissive]
  547 | explicit multimap(const Compare& comp, const Allocator& = Allocator());
      |          ^~~~~~~~
p906.cpp:547:1: error: 'explicit' outside class declaration
  547 | explicit multimap(const Compare& comp, const Allocator& = Allocator());
      | ^~~~~~~~
p906.cpp:550:13: error: 'Compare' does not name a type
  550 |       const Compare& comp = Compare(),
      |             ^~~~~~~
p906.cpp:550:29: error: there are no arguments to 'Compare' that depend on a template parameter, so a declaration of 'Compare' must be available [-fpermissive]
  550 |       const Compare& comp = Compare(),
      |                             ^~~~~~~
p906.cpp:551:38: error: expected constructor, destructor, or type conversion before ';' token
  551 |       const Allocator& = Allocator());
      |                                      ^
p906.cpp:554:10: error: 'container_compatible_range' has not been declared
  554 | template<container_compatible_range<value_type> R>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:554:36: error: expected '>' before '<' token
  554 | template<container_compatible_range<value_type> R>
      |                                    ^
p906.cpp:555:9: error: expected constructor, destructor, or type conversion before '(' token
  555 | multimap(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
      |         ^
p906.cpp:559:19: error: invalid use of template-name 'std::iterator' without an argument list
  559 | template<class P> iterator insert(P&& x);
      |                   ^~~~~~~~
p906.cpp:559:19: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:560:19: error: invalid use of template-name 'std::iterator' without an argument list
  560 | template<class P> iterator insert(const_iterator position, P&& x);
      |                   ^~~~~~~~
p906.cpp:560:19: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17'
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:566:14: error: redeclaration of 'template<class Key, class T, class Compare, class Allocator, class Predicate> typename std::multimap::size_type erase_if'
  566 |     erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
      |              ^~~~~~~~
p906.cpp:371:5: note: previous declaration 'template<class Key, class T, class Compare, class Allocator, class Predicate> typename std::map::size_type erase_if<Key, T, Compare, Allocator, Predicate>'
  371 |     erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred);
      |     ^~~~~~~~
p906.cpp:566:14: error: reference to 'multimap' is ambiguous
  566 |     erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
      |              ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: candidates are: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap'
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:547:10: note:                 'int multimap(const int&, const std::Allocator&)'
  547 | explicit multimap(const Compare& comp, const Allocator& = Allocator());
      |          ^~~~~~~~
p906.cpp:566:26: error: expected primary-expression before ',' token
  566 |     erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
      |                          ^
p906.cpp:566:29: error: expected primary-expression before ',' token
  566 |     erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
      |                             ^
p906.cpp:566:38: error: expected primary-expression before ',' token
  566 |     erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
      |                                      ^
p906.cpp:566:49: error: expected primary-expression before '>' token
  566 |     erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
      |                                                 ^
p906.cpp:566:52: error: 'c' was not declared in this scope
  566 |     erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
      |                                                    ^
p906.cpp:566:65: error: expected primary-expression before 'pred'
  566 |     erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
      |                                                                 ^~~~
p906.cpp:566:5: warning: variable templates only available with '-std=c++14' or '-std=gnu++14' [-Wc++14-extensions]
  566 |     erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);
      |     ^~~~~~~~
p906.cpp:568:8: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
  568 |        auto original_size = c.size();
      |        ^~~~
      |        ----
p906.cpp:568:13: error: 'original_size' does not name a type
  568 |        auto original_size = c.size();
      |             ^~~~~~~~~~~~~
p906.cpp:569:8: error: expected unqualified-id before 'for'
  569 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |        ^~~
p906.cpp:569:49: error: 'i' does not name a type
  569 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                 ^
p906.cpp:569:60: error: expected unqualified-id before ')' token
  569 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                            ^
p906.cpp:574:8: error: expected unqualified-id before 'return'
  574 |        return original_size - c.size();
      |        ^~~~~~
p906.cpp:581:48: error: spurious '>>', use '>' to terminate a template argument list
  581 |                 class Allocator = allocator<Key>>
      |                                                ^~
p906.cpp:582:18: error: definition of 'class std::set' inside template parameter list
  582 |        class set {
      |                  ^
p906.cpp:581:35: error: two or more data types in declaration of 'type name'
  581 |                 class Allocator = allocator<Key>>
      |                                   ^~~~~~~~~~~~~~~
p906.cpp:708:4: error: expected '>' before ';' token
  708 |   };
      |    ^
p906.cpp:708:4: error: expected unqualified-id before ';' token
p906.cpp:710:22: error: 'iter_value_type' was not declared in this scope
  710 | class Compare = less<iter_value_type<InputIterator>>,
      |                      ^~~~~~~~~~~~~~~
p906.cpp:714:58: error: wrong number of template arguments (2, should be 1)
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                                                          ^
/usr/local/include/c++/12.1.0/bits/stl_function.h:403:12: note: provided for 'template<class _Tp> struct std::less'
  403 |     struct less : public binary_function<_Tp, _Tp, bool>
      |            ^~~~
p906.cpp:714:59: error: expected '>' before ';' token
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                                                           ^
p906.cpp:714:59: error: expected unqualified-id before ';' token
p906.cpp:715:12: error: 'ranges' has not been declared
  715 |   template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>,
      |            ^~~~~~
p906.cpp:715:32: error: expected '>' before 'R'
  715 |   template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>,
      |                                ^
p906.cpp:718:59: error: expected unqualified-id before ';' token
  718 |       -> set<ranges::range_value_t<R>, Compare, Allocator>;
      |                                                           ^
p906.cpp:719:81: error: spurious '>>', use '>' to terminate a template argument list
  719 |   template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                                                                                 ^~
p906.cpp:719:68: error: two or more data types in declaration of 'type name'
  719 |   template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                                                                    ^~~~~~~~~~~~~~~
p906.cpp:720:8: error: expected '>' before '(' token
  720 |     set(initializer_list<Key>, Compare = Compare(), Allocator = Allocator())
      |        ^
p906.cpp:721:38: error: expected unqualified-id before ';' token
  721 |       -> set<Key, Compare, Allocator>;
      |                                      ^
p906.cpp:723:22: error: expected ')' before ',' token
  723 |     set(InputIterator, InputIterator, Allocator)
      |        ~             ^
      |                      )
p906.cpp:725:12: error: 'ranges' has not been declared
  725 |   template<ranges::input_range R, class Allocator>
      |            ^~~~~~
p906.cpp:725:32: error: expected '>' before 'R'
  725 |   template<ranges::input_range R, class Allocator>
      |                                ^
p906.cpp:726:21: error: expected ')' before ',' token
  726 |     set(from_range_t, R&&, Allocator)
      |        ~            ^
      |                     )
p906.cpp:729:25: error: expected ')' before '<' token
  729 |     set(initializer_list<Key>, Allocator) -> set<Key, less<Key>, Allocator>;
      |        ~                ^
      |                         )
p906.cpp:732:14: error: expected unqualified-id before 'const'
  732 | explicit set(const Compare& comp, const Allocator& = Allocator());
      |              ^~~~~
p906.cpp:732:14: error: expected ')' before 'const'
  732 | explicit set(const Compare& comp, const Allocator& = Allocator());
      |             ~^~~~~
      |              )
p906.cpp:734:20: error: expected ')' before 'first'
  734 |   set(InputIterator first, InputIterator last,
      |      ~             ^~~~~~
      |                    )
p906.cpp:738:10: error: 'container' has not been declared
  738 | template<container-compatible-range<value_type> R>
      |          ^~~~~~~~~
p906.cpp:738:19: error: expected '>' before '-' token
  738 | template<container-compatible-range<value_type> R>
      |                   ^
p906.cpp:739:17: error: expected ')' before ',' token
  739 | set(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
      |    ~            ^
      |                 )
p906.cpp:744:12: error: expected nested-name-specifier before 'set'
  744 |   typename set<Key, Compare, Allocator>::size_type
      |            ^~~
p906.cpp:744:15: error: expected initializer before '<' token
  744 |   typename set<Key, Compare, Allocator>::size_type
      |               ^
p906.cpp:747:8: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
  747 |        auto original_size = c.size();
      |        ^~~~
      |        ----
p906.cpp:747:13: error: 'original_size' does not name a type
  747 |        auto original_size = c.size();
      |             ^~~~~~~~~~~~~
p906.cpp:748:8: error: expected unqualified-id before 'for'
  748 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |        ^~~
p906.cpp:748:49: error: 'i' does not name a type
  748 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                 ^
p906.cpp:748:60: error: expected unqualified-id before ')' token
  748 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                            ^
p906.cpp:753:8: error: expected unqualified-id before 'return'
  753 |        return original_size - c.size();
      |        ^~~~~~
p906.cpp:760:48: error: spurious '>>', use '>' to terminate a template argument list
  760 |                 class Allocator = allocator<Key>>
      |                                                ^~
p906.cpp:761:23: error: definition of 'class std::multiset' inside template parameter list
  761 |        class multiset {
      |                       ^
p906.cpp:760:35: error: two or more data types in declaration of 'type name'
  760 |                 class Allocator = allocator<Key>>
      |                                   ^~~~~~~~~~~~~~~
p906.cpp:885:2: error: expected '>' before ';' token
  885 | };
      |  ^
p906.cpp:885:2: error: expected unqualified-id before ';' token
p906.cpp:887:22: error: 'iter_value_type' was not declared in this scope
  887 | class Compare = less<iter_value_type<InputIterator>>,
      |                      ^~~~~~~~~~~~~~~
p906.cpp:891:63: error: wrong number of template arguments (2, should be 1)
  891 | -> multiset<iter_value_type<InputIterator>, Compare, Allocator>;
      |                                                               ^
/usr/local/include/c++/12.1.0/bits/stl_function.h:403:12: note: provided for 'template<class _Tp> struct std::less'
  403 |     struct less : public binary_function<_Tp, _Tp, bool>
      |            ^~~~
p906.cpp:891:64: error: expected '>' before ';' token
  891 | -> multiset<iter_value_type<InputIterator>, Compare, Allocator>;
      |                                                                ^
p906.cpp:891:64: error: expected unqualified-id before ';' token
p906.cpp:892:14: error: 'ranges' has not been declared
  892 |     template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>,
      |              ^~~~~~
p906.cpp:892:34: error: expected '>' before 'R'
  892 |     template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>,
      |                                  ^
p906.cpp:895:66: error: expected unqualified-id before ';' token
  895 |         -> multiset<ranges::range_value_t<R>, Compare, Allocator>;
      |                                                                  ^
p906.cpp:896:83: error: spurious '>>', use '>' to terminate a template argument list
  896 |     template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                                                                                   ^~
p906.cpp:896:70: error: two or more data types in declaration of 'type name'
  896 |     template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                                                                      ^~~~~~~~~~~~~~~
p906.cpp:897:15: error: expected '>' before '(' token
  897 |       multiset(initializer_list<Key>, Compare = Compare(), Allocator = Allocator())
      |               ^
p906.cpp:898:45: error: expected unqualified-id before ';' token
  898 |         -> multiset<Key, Compare, Allocator>;
      |                                             ^
p906.cpp:900:29: error: expected ')' before ',' token
  900 |       multiset(InputIterator, InputIterator, Allocator)
      |               ~             ^
      |                             )
p906.cpp:902:14: error: 'ranges' has not been declared
  902 |     template<ranges::input_range R, class Allocator>
      |              ^~~~~~
p906.cpp:902:34: error: expected '>' before 'R'
  902 |     template<ranges::input_range R, class Allocator>
      |                                  ^
p906.cpp:903:28: error: expected ')' before ',' token
  903 |       multiset(from_range_t, R&&, Allocator)
      |               ~            ^
      |                            )
p906.cpp:906:32: error: expected ')' before '<' token
  906 |       multiset(initializer_list<Key>, Allocator) -> multiset<Key, less<Key>, Allocator>;
      |               ~                ^
      |                                )
p906.cpp:909:19: error: expected unqualified-id before 'const'
  909 | explicit multiset(const Compare& comp, const Allocator& = Allocator());
      |                   ^~~~~
p906.cpp:909:19: error: expected ')' before 'const'
  909 | explicit multiset(const Compare& comp, const Allocator& = Allocator());
      |                  ~^~~~~
      |                   )
p906.cpp:911:25: error: expected ')' before 'first'
  911 |   multiset(InputIterator first, InputIterator last,
      |           ~             ^~~~~~
      |                         )
p906.cpp:915:10: error: 'container' has not been declared
  915 | template<container-compatible-range<value_type> R>
      |          ^~~~~~~~~
p906.cpp:915:19: error: expected '>' before '-' token
  915 | template<container-compatible-range<value_type> R>
      |                   ^
p906.cpp:916:22: error: expected ')' before ',' token
  916 | multiset(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
      |         ~            ^
      |                      )
p906.cpp:921:12: error: expected nested-name-specifier before 'multiset'
  921 |   typename multiset<Key, Compare, Allocator>::size_type
      |            ^~~~~~~~
p906.cpp:921:20: error: expected initializer before '<' token
  921 |   typename multiset<Key, Compare, Allocator>::size_type
      |                    ^
p906.cpp:924:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
  924 | auto original_size = c.size();
      | ^~~~
      | ----
p906.cpp:924:6: error: 'original_size' does not name a type
  924 | auto original_size = c.size();
      |      ^~~~~~~~~~~~~
p906.cpp:925:1: error: expected unqualified-id before 'for'
  925 | for (auto i = c.begin(), last = c.end(); i != last; ) {
      | ^~~
p906.cpp:925:42: error: 'i' does not name a type
  925 | for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                          ^
p906.cpp:925:53: error: expected unqualified-id before ')' token
  925 | for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                     ^
p906.cpp:931:1: error: expected unqualified-id before 'return'
  931 | return original_size - c.size();
      | ^~~~~~

$ g++ p906.cpp -std=2b -o p906g -I. -Wall
p906.cpp:24:41: error: expected '=' before '-' token
   24 | template<class InputIterator> using iter-mapped-type =
      |                                         ^
p906.cpp:24:41: error: expected type-specifier before '-' token
p906.cpp:28:11: error: expected '=' before '-' token
   28 | using iter-to-alloc-type = pair<
      |           ^
p906.cpp:28:11: error: expected type-specifier before '-' token
p906.cpp:32:7: error: expected nested-name-specifier before 'range'
   32 | using range-mapped-type = typename ranges::range_value_t<Range>::second_type; // exposition only template<ranges::input_range Range>
      |       ^~~~~
p906.cpp:33:7: error: expected nested-name-specifier before 'range'
   33 | using range-to-alloc-type =
      |       ^~~~~
p906.cpp:41:30: error: redefinition of default argument for 'class Compare'
   41 | template<class Key, class T, class Compare = less<Key>,
      |                              ^~~~~
In file included from /usr/local/include/c++/12.1.0/map:61,
                 from N4910.h:10,
                 from p906.cpp:10:
/usr/local/include/c++/12.1.0/bits/stl_map.h:98:42: note: original definition appeared here
   98 |   template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
      |                                          ^~~~~~~~
p906.cpp:48:1: error: 'synth_three_way_result' does not name a type; did you mean 'compare_three_way_result'?
   48 | synth_three_way_result<pair<const Key, T>> operator<=>(const map<Key, T, Compare, Allocator>& x,
      | ^~~~~~~~~~~~~~~~~~~~~~
      | compare_three_way_result
p906.cpp:59:30: error: redefinition of default argument for 'class Compare'
   59 | template<class Key, class T, class Compare = less<Key>,
      |                              ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:71:42: note: original definition appeared here
   71 |   template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      |                                          ^~~~~~~~
p906.cpp:66:1: error: 'synth_three_way_result' does not name a type; did you mean 'compare_three_way_result'?
   66 | synth_three_way_result<pair<const Key, T>>
      | ^~~~~~~~~~~~~~~~~~~~~~
      | compare_three_way_result
p906.cpp:95:1: error: 'synth_three_way_result' does not name a type; did you mean 'compare_three_way_result'?
   95 | synth_three_way_result<Key> operator<=>(const set<Key, Compare, Allocator>& x, const set<Key, Compare, Allocator>& y);
      | ^~~~~~~~~~~~~~~~~~~~~~
      | compare_three_way_result
p906.cpp:110:1: error: 'synth_three_way_result' does not name a type; did you mean 'compare_three_way_resul'?
  110 | synth_three_way_result<Key> operator<=>(const multiset<Key, Compare, Allocator>& x, const multiset<Key, Compare, Allocator>& y);
      | ^~~~~~~~~~~~~~~~~~~~~~
      | compare_three_way_result
p906.cpp:129:37: error: redefinition of default argument for 'class Compare'
  129 |        template<class Key, class T, class Compare = less<Key>,
      |                                     ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:98:42: note: original definition appeared here
   98 |   template <typename _Key, typename _Tp, typename _Compare = std::less<_Key>,
      |                                          ^~~~~~~~
p906.cpp:291:52: error: 'iter' was not declared in this scope
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                    ^~~~
p906.cpp:291:57: error: 'key' was not declared in this scope
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                         ^~~
p906.cpp:291:61: error: 'type' was not declared in this scope; did you mean 'std::__cmp_cat::type'?
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                             ^~~~
      |                                                             std::__cmp_cat::type
In file included from /usr/local/include/c++/12.1.0/bits/char_traits.h:45,
                 from /usr/local/include/c++/12.1.0/ios:40,
                 from /usr/local/include/c++/12.1.0/ostream:38,
                 from /usr/local/include/c++/12.1.0/iostream:39,
                 from N4910.h:2:
/usr/local/include/c++/12.1.0/compare:51:11: note: 'std::__cmp_cat::type' declared here
   51 |     using type = signed char;
      |           ^~~~
p906.cpp:291:79: error: template argument 1 is invalid
  291 | template<class InputIterator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                                               ^~
p906.cpp:291:111: error: 'iter' was not declared in this scope
  291 | erator, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                                                         ^~~~

p906.cpp:291:116: error: 'to' was not declared in this scope; did you mean 'tm'?
  291 | r, class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                                                         ^~
      |                                                                                         tm
p906.cpp:291:119: error: 'alloc' was not declared in this scope; did you mean 'malloc'?
  291 | class Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                                                         ^~~~~
      |                                                                                         malloc
p906.cpp:291:125: error: 'type' was not declared in this scope; did you mean 'std::__cmp_cat::type'?
  291 | Compare = less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                                                         ^~~~
      |                                                                                         std::__cmp_cat::type
/usr/local/include/c++/12.1.0/compare:51:11: note: 'std::__cmp_cat::type' declared here
   51 |     using type = signed char;
      |           ^~~~
p906.cpp:291:143: error: template argument 1 is invalid
  291 | less<iter-key-type<InputIterator>>, class Allocator = allocator<iter-to-alloc-type<InputIterator>>>
      |                                                                                                 ^~

p906.cpp:293:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:293:68: error: template argument 2 is invalid
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                                                    ^
p906.cpp:293:68: error: template argument 4 is invalid
p906.cpp:293:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:293:68: error: template argument 2 is invalid
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                                                    ^
p906.cpp:293:68: error: template argument 4 is invalid
p906.cpp:293:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:293:68: error: template argument 2 is invalid
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                                                    ^
p906.cpp:293:68: error: template argument 4 is invalid
p906.cpp:293:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:293:68: error: template argument 2 is invalid
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                                                    ^
p906.cpp:293:68: error: template argument 4 is invalid
p906.cpp:293:4: error: invalid template-id
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |    ^~~
p906.cpp:293:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:293:68: error: expected primary-expression before '>' token
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                                                    ^
p906.cpp:293:68: error: trailing return type 'map<...auto...>' of deduction guide is not a specialization of 'std::map<_Key, _Tp, _Compare, _Alloc>'
p906.cpp:293:69: error: expected ';' before ',' token
  293 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, Compare, Allocator>;
      |                                                                     ^
      |                                                                     ;
p906.cpp:294:124: error: wrong number of template arguments (2, should be at least 0)
  294 | nge R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                                                   ^

In file included from /usr/local/include/c++/12.1.0/string:48,
                 from /usr/local/include/c++/12.1.0/bits/locale_classes.h:40,
                 from /usr/local/include/c++/12.1.0/bits/ios_base.h:41,
                 from /usr/local/include/c++/12.1.0/ios:42:
/usr/local/include/c++/12.1.0/bits/stl_function.h:359:12: note: provided for 'template<class _Tp> struct std::less'
  359 |     struct less;
      |            ^~~~
p906.cpp:295:4: error: expected '>' before '(' token
  295 | map(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
      |    ^
p906.cpp:296:68: error: expected unqualified-id before ';' token
  296 | -> map<range_key_type<R>, range-mapped-type<R>, Compare, Allocator>;
      |                                                                    ^
p906.cpp:303:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:303:68: error: template argument 2 is invalid
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                    ^
p906.cpp:303:68: error: template argument 4 is invalid
p906.cpp:303:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:303:68: error: template argument 2 is invalid
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                    ^
p906.cpp:303:68: error: template argument 4 is invalid
p906.cpp:303:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:303:68: error: template argument 2 is invalid
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                    ^
p906.cpp:303:68: error: template argument 4 is invalid
p906.cpp:303:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:303:68: error: template argument 2 is invalid
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                    ^
p906.cpp:303:68: error: template argument 4 is invalid
p906.cpp:303:4: error: invalid template-id
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |    ^~~
p906.cpp:303:38: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      iter_value_type
p906.cpp:303:68: error: expected primary-expression before '>' token
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                    ^
p906.cpp:303:68: error: trailing return type 'map<...auto...>' of deduction guide is not a specialization of 'std::map<_Key, _Tp, _Compare, _Alloc>'
p906.cpp:303:69: error: expected ';' before ',' token
  303 | -> map<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                     ^
      |                                                                     ;
p906.cpp:305:23: error: expected ')' before ',' token
  305 |       map(from_range_t, R&&, Allocator)
      |          ~            ^
      |                       )
p906.cpp:311:20: error: 'Compare' does not name a type
  311 | explicit map(const Compare& comp, const Allocator& = Allocator());
      |                    ^~~~~~~
p906.cpp:311:64: error: invalid use of incomplete type 'class std::Allocator'
  311 | explicit map(const Compare& comp, const Allocator& = Allocator());
      |                                                                ^
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
p906.cpp:311:10: error: deduction guide for 'std::map<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  311 | explicit map(const Compare& comp, const Allocator& = Allocator());
      |          ^~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:100:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map' declared here
  100 |     class map
      |           ^~~
p906.cpp:314:8: error: 'Compare' does not name a type
  314 |  const Compare& comp = Compare(), const Allocator& = Allocator());
      |        ^~~~~~~
p906.cpp:314:24: error: there are no arguments to 'Compare' that depend on a template parameter, so a declaration of 'Compare' must be available [-fpermissive]
  314 |  const Compare& comp = Compare(), const Allocator& = Allocator());
      |                        ^~~~~~~
p906.cpp:314:24: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
p906.cpp:313:3: error: deduction guide for 'std::map<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  313 |   map(InputIterator first, InputIterator last,
      |   ^~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:100:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map' declared here
  100 |     class map
      |           ^~~
p906.cpp:317:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  317 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:317:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  317 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:317:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  317 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:317:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  317 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:317:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  317 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:317:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  317 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:317:10: error: 'container_compatible_range' has not been declared
  317 | template<container_compatible_range<value_type> R>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:317:36: error: expected '>' before '<' token
  317 | template<container_compatible_range<value_type> R>
      |                                    ^
p906.cpp:318:17: error: expected ')' before ',' token
  318 | map(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
      |    ~            ^
      |                 )
p906.cpp:322:1: error: 'mapped_type' does not name a type
  322 | mapped_type& operator[](const key_type& x);
      | ^~~~~~~~~~~
p906.cpp:325:7: error: 'mapped_type' does not name a type
  325 | const mapped_type& at(const key_type& x) const;
      |       ^~~~~~~~~~~
p906.cpp:330:8: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  330 |   pair<iterator, bool> insert(P&& x);
      |        ^~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/stl_construct.h:61,
                 from /usr/local/include/c++/12.1.0/bits/char_traits.h:46:
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:330:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  330 |   pair<iterator, bool> insert(P&& x);
      |                      ^
p906.cpp:330:22: note:   expected a type, got 'iterator'
p906.cpp:332:3: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  332 |   iterator insert(const_iterator position, P&& x);
      |   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:332:19: error: 'template<class P> iterator<...auto...> insert' conflicts with a previous declaration
  332 |   iterator insert(const_iterator position, P&& x);
      |                   ^~~~~~~~~~~~~~
p906.cpp:330:24: note: previous declaration 'int insert(P&&)'
  330 |   pair<iterator, bool> insert(P&& x);
      |                        ^~~~~~
p906.cpp:332:19: error: 'const_iterator' was not declared in this scope
  332 |   iterator insert(const_iterator position, P&& x);
      |                   ^~~~~~~~~~~~~~
p906.cpp:332:45: error: expected primary-expression before '&&' token
  332 |   iterator insert(const_iterator position, P&& x);
      |                                             ^~
p906.cpp:332:48: error: 'x' was not declared in this scope
  332 |   iterator insert(const_iterator position, P&& x);
      |                                                ^
p906.cpp:336:8: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |        ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:336:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                      ^
p906.cpp:336:22: note:   expected a type, got 'iterator'
p906.cpp:336:42: error: 'key_type' does not name a type; did you mean 'key_t'?
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                                          ^~~~~~~~
      |                                          key_t
p906.cpp:338:3: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  338 |   iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
      |   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:338:24: error: 'template<class ... Args> iterator<...auto...> try_emplace' conflicts with a previous declaration
  338 |   iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
      |                        ^~~~~~~~~~~~~~
p906.cpp:336:24: note: previous declaration 'int try_emplace(const int&, Args&& ...)'
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                        ^~~~~~~~~~~
p906.cpp:338:24: error: 'const_iterator' was not declared in this scope
  338 |   iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
      |                        ^~~~~~~~~~~~~~
p906.cpp:338:45: error: expected primary-expression before 'const'
  338 |   iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
      |                                             ^~~~~
p906.cpp:338:68: error: expected primary-expression before '&&' token
  338 |   iterator try_emplace(const_iterator hint, const key_type& k, Args&&... args);
      |                                                                    ^~
p906.cpp:344:8: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |        ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:344:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                      ^
p906.cpp:344:22: note:   expected a type, got 'iterator'
p906.cpp:344:36: error: 'template<class ... Args> int try_emplace' conflicts with a previous declaration
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                    ^~~~~~~~
p906.cpp:336:24: note: previous declaration 'int try_emplace(const int&, Args&& ...)'
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                        ^~~~~~~~~~~
p906.cpp:344:36: error: 'key_type' was not declared in this scope; did you mean 'key_t'?
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                    ^~~~~~~~
      |                                    key_t
p906.cpp:344:47: error: 'k' was not declared in this scope
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                               ^
p906.cpp:344:54: error: expected primary-expression before '&&' token
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                                      ^~
p906.cpp:344:64: error: expression list treated as compound expression in initializer [-fpermissive]
  344 |   pair<iterator, bool> try_emplace(key_type&& k, Args&&... args);
      |                                                                ^
p906.cpp:346:3: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  346 |   iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
      |   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:346:24: error: 'template<class ... Args> iterator<...auto...> try_emplace' conflicts with a previous declaration
  346 |   iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
      |                        ^~~~~~~~~~~~~~
p906.cpp:336:24: note: previous declaration 'int try_emplace(const int&, Args&& ...)'
  336 |   pair<iterator, bool> try_emplace(const key_type& k, Args&&... args);
      |                        ^~~~~~~~~~~
p906.cpp:346:24: error: 'const_iterator' was not declared in this scope
  346 |   iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
      |                        ^~~~~~~~~~~~~~
p906.cpp:346:45: error: 'key_type' was not declared in this scope; did you mean 'key_t'?
  346 |   iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
      |                                             ^~~~~~~~
      |                                             key_t
p906.cpp:346:56: error: 'k' was not declared in this scope
  346 |   iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
      |                                                        ^
p906.cpp:346:63: error: expected primary-expression before '&&' token
  346 |   iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args);
      |                                                               ^~
p906.cpp:352:8: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |        ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:352:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |                      ^
p906.cpp:352:22: note:   expected a type, got 'iterator'
p906.cpp:352:47: error: 'key_type' does not name a type; did you mean 'key_t'?
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |                                               ^~~~~~~~
      |                                               key_t
p906.cpp:354:3: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  354 |   iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
      |   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:354:29: error: 'template<class M> iterator<...auto...> insert_or_assign' conflicts with a previous declaration
  354 |   iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
      |                             ^~~~~~~~~~~~~~
p906.cpp:352:24: note: previous declaration 'int insert_or_assign(const int&, M&&)'
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |                        ^~~~~~~~~~~~~~~~
p906.cpp:354:29: error: 'const_iterator' was not declared in this scope
  354 |   iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
      |                             ^~~~~~~~~~~~~~
p906.cpp:354:50: error: expected primary-expression before 'const'
  354 |   iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
      |                                                  ^~~~~
p906.cpp:354:70: error: expected primary-expression before '&&' token
  354 |   iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
      |                                                                      ^~
p906.cpp:354:73: error: 'obj' was not declared in this scope
  354 |   iterator insert_or_assign(const_iterator hint, const key_type& k, M&& obj);
      |                                                                         ^~~
p906.cpp:361:8: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |        ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:361:22: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                      ^
p906.cpp:361:22: note:   expected a type, got 'iterator'
p906.cpp:361:41: error: 'template<class M> int insert_or_assign' conflicts with a previous declaration
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                         ^~~~~~~~
p906.cpp:352:24: note: previous declaration 'int insert_or_assign(const int&, M&&)'
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |                        ^~~~~~~~~~~~~~~~
p906.cpp:361:41: error: 'key_type' was not declared in this scope; did you mean 'key_t'?
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                         ^~~~~~~~
      |                                         key_t
p906.cpp:361:52: error: 'k' was not declared in this scope
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                                    ^
p906.cpp:361:56: error: expected primary-expression before '&&' token
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                                        ^~
p906.cpp:361:59: error: 'obj' was not declared in this scope
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                                           ^~~
p906.cpp:361:62: error: expression list treated as compound expression in initializer [-fpermissive]
  361 |   pair<iterator, bool> insert_or_assign(key_type&& k, M&& obj);
      |                                                              ^
p906.cpp:363:3: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  363 |   iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
      |   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:363:29: error: 'template<class M> iterator<...auto...> insert_or_assign' conflicts with a previous declaration
  363 |   iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
      |                             ^~~~~~~~~~~~~~
p906.cpp:352:24: note: previous declaration 'int insert_or_assign(const int&, M&&)'
  352 |   pair<iterator, bool> insert_or_assign(const key_type& k, M&& obj);
      |                        ^~~~~~~~~~~~~~~~
p906.cpp:363:29: error: 'const_iterator' was not declared in this scope
  363 |   iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
      |                             ^~~~~~~~~~~~~~
p906.cpp:363:50: error: 'key_type' was not declared in this scope; did you mean 'key_t'?
  363 |   iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
      |                                                  ^~~~~~~~
      |                                                  key_t
p906.cpp:363:61: error: 'k' was not declared in this scope
  363 |   iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
      |                                                             ^
p906.cpp:363:65: error: expected primary-expression before '&&' token
  363 |   iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
      |                                                                 ^~
p906.cpp:363:68: error: 'obj' was not declared in this scope
  363 |   iterator insert_or_assign(const_iterator hint, key_type&& k, M&& obj);
      |                                                                    ^~~
p906.cpp:373:29: error: 'c' was not declared in this scope
  373 |        auto original_size = c.size();
      |                             ^
p906.cpp:374:8: error: expected unqualified-id before 'for'
  374 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |        ^~~
p906.cpp:374:49: error: 'i' does not name a type
  374 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                 ^
p906.cpp:374:60: error: expected unqualified-id before ')' token
  374 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                            ^
p906.cpp:379:8: error: expected unqualified-id before 'return'
  379 |        return original_size - c.size();
      |        ^~~~~~
p906.cpp:385:34: error: redefinition of default argument for 'class Compare'
  385 |     template<class Key, class T, class Compare = less<Key>,
      |                                  ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:71:42: note: original definition appeared here
   71 |   template <typename _Key, typename _Tp, typename _Compare, typename _Alloc>
      |                                          ^~~~~~~~
p906.cpp:414:1: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  414 | multimap() : multimap(Compare()) { }
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:415:25: error: 'Compare' does not name a type
  415 | explicit multimap(const Compare& comp, const Allocator& = Allocator()); template<class InputIterator>
      |                         ^~~~~~~
p906.cpp:415:69: error: invalid use of incomplete type 'class std::Allocator'
  415 | explicit multimap(const Compare& comp, const Allocator& = Allocator()); template<class InputIterator>
      |                                                                     ^
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
p906.cpp:415:10: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  415 | explicit multimap(const Compare& comp, const Allocator& = Allocator()); template<class InputIterator>
      |          ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:417:18: error: 'Compare' does not name a type
  417 |            const Compare& comp = Compare(),
      |                  ^~~~~~~
p906.cpp:417:34: error: there are no arguments to 'Compare' that depend on a template parameter, so a declaration of 'Compare' must be available [-fpermissive]
  417 |            const Compare& comp = Compare(),
      |                                  ^~~~~~~
p906.cpp:416:3: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  416 |   multimap(InputIterator first, InputIterator last,
      |   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:418:70: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                                                      ^~~~~~~~~~
      |                                                                      false_type
p906.cpp:418:70: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                                                      ^~~~~~~~~~
      |                                                                      false_type
p906.cpp:418:70: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                                                      ^~~~~~~~~~
      |                                                                      false_type
p906.cpp:418:70: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                                                      ^~~~~~~~~~
      |                                                                      false_type
p906.cpp:418:70: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                                                      ^~~~~~~~~~
      |                                                                      false_type
p906.cpp:418:70: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                                                      ^~~~~~~~~~
      |                                                                      false_type
p906.cpp:418:43: error: 'container_compatible_range' has not been declared
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:418:69: error: expected '>' before '<' token
  418 | const Allocator& = Allocator()); template<container_compatible_range<value_type> R>
      |                                                                     ^
p906.cpp:419:24: error: expected ')' before ',' token
  419 |   multimap(from_range_t, R&& rg,
      |           ~            ^
      |                        )
p906.cpp:421:10: error: template placeholder type 'const multimap<...auto...>' must be followed by a simple declarator-id
  421 | multimap(const multimap& x);
      |          ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:421:1: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  421 | multimap(const multimap& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:422:10: error: template placeholder type 'multimap<...auto...>' must be followed by a simple declarator-id
  422 | multimap(multimap&& x);
      |          ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:422:1: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  422 | multimap(multimap&& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:423:10: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  423 | explicit multimap(const Allocator&);
      |          ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:424:10: error: class template placeholder 'std::multimap' not permitted in this context
  424 | multimap(const multimap&, const type_identity_t<Allocator>&);
      |          ^~~~~
p906.cpp:424:10: note: use 'auto' for an abbreviated function template
p906.cpp:424:1: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  424 | multimap(const multimap&, const type_identity_t<Allocator>&);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:425:10: error: class template placeholder 'std::multimap' not permitted in this context
  425 | multimap(multimap&&, const type_identity_t<Allocator>&);
      |          ^~~~~~~~
p906.cpp:425:10: note: use 'auto' for an abbreviated function template
p906.cpp:425:1: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  425 | multimap(multimap&&, const type_identity_t<Allocator>&);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:426:27: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  426 | multimap(initializer_list<value_type>,
      |                           ^~~~~~~~~~
      |                           false_type
p906.cpp:426:37: error: template argument 1 is invalid
  426 | multimap(initializer_list<value_type>,
      |                                     ^
p906.cpp:427:9: error: 'Compare' does not name a type
  427 |   const Compare& = Compare(),
      |         ^~~~~~~
p906.cpp:427:20: error: 'Compare' was not declared in this scope
  427 |   const Compare& = Compare(),
      |                    ^~~~~~~
p906.cpp:428:32: error: invalid use of incomplete type 'class std::Allocator'
  428 |   const Allocator& = Allocator());
      |                                ^
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
p906.cpp:426:1: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  426 | multimap(initializer_list<value_type>,
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:430:3: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  430 |   multimap(InputIterator first, InputIterator last, const Allocator& a)
      |   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:432:37: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                     ^~~~~~~~~~
      |                                     false_type
p906.cpp:432:37: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                     ^~~~~~~~~~
      |                                     false_type
p906.cpp:432:37: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                     ^~~~~~~~~~
      |                                     false_type
p906.cpp:432:37: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                     ^~~~~~~~~~
      |                                     false_type
p906.cpp:432:37: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                     ^~~~~~~~~~
      |                                     false_type
p906.cpp:432:37: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                     ^~~~~~~~~~
      |                                     false_type
p906.cpp:432:10: error: 'container_compatible_range' has not been declared
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:432:36: error: expected '>' before '<' token
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                    ^
p906.cpp:432:73: error: expected ')' before ',' token
  432 | template<container_compatible_range<value_type> R> multimap(from_range_t, R&& rg, const Allocator& a))
      |                                                            ~            ^
      |                                                                         )
p906.cpp:435:16: error: template argument required for 'class multimap'
  435 |   friend class multimap;
      |                ^~~~~~~~
p906.cpp:435:3: error: friend declaration does not name a class or function
  435 |   friend class multimap;
      |   ^~~~~~
p906.cpp:436:27: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  436 | multimap(initializer_list<value_type> il, const Allocator& a)
      |                           ^~~~~~~~~~
      |                           false_type
p906.cpp:436:37: error: template argument 1 is invalid
  436 | multimap(initializer_list<value_type> il, const Allocator& a)
      |                                     ^
p906.cpp:436:1: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  436 | multimap(initializer_list<value_type> il, const Allocator& a)
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:438:10: error: expected class-name before '(' token
  438 | ~multimap();
      |          ^
p906.cpp:439:21: error: template placeholder type 'const multimap<...auto...>' must be followed by a simple declarator-id
  439 | multimap& operator=(const multimap& x); multimap& operator=(multimap&& x)
      |                     ^~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:439:1: error: deduced class type 'multimap' in function return type
  439 | multimap& operator=(const multimap& x); multimap& operator=(multimap&& x)
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:439:61: error: template placeholder type 'multimap<...auto...>' must be followed by a simple declarator-id
  439 | multimap& operator=(const multimap& x); multimap& operator=(multimap&& x)
      |                                                             ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:439:41: error: deduced class type 'multimap' in function return type
  439 | multimap& operator=(const multimap& x); multimap& operator=(multimap&& x)
      |                                         ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:442:38: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  442 | multimap& operator=(initializer_list<value_type>);
      |                                      ^~~~~~~~~~
      |                                      false_type
p906.cpp:442:48: error: template argument 1 is invalid
  442 | multimap& operator=(initializer_list<value_type>);
      |                                                ^
p906.cpp:442:1: error: deduced class type 'multimap' in function return type
  442 | multimap& operator=(initializer_list<value_type>);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:443:1: error: 'allocator_type' does not name a type; did you mean 'allocator_traits'?
  443 | allocator_type get_allocator() const noexcept;
      | ^~~~~~~~~~~~~~
      | allocator_traits
p906.cpp:445:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  445 | iterator begin() noexcept;
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:445:1: error: deduced class type 'iterator' in function return type
  445 | iterator begin() noexcept;
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:446:1: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  446 | const_iterator begin() const noexcept;
      | ^~~~~~~~~~~~~~
      | move_iterator
p906.cpp:447:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  447 | iterator end() noexcept;
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:447:1: error: deduced class type 'iterator' in function return type
  447 | iterator end() noexcept;
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:448:1: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  448 | const_iterator end() const noexcept;
      | ^~~~~~~~~~~~~~
      | move_iterator
p906.cpp:449:1: error: deduced class type 'reverse_iterator' in function return type
  449 | reverse_iterator rbegin() noexcept;
      | ^~~~~~~~~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/string:47:
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:132:11: note: 'template<class _Iterator> class std::reverse_iterator' declared here
  132 |     class reverse_iterator
      |           ^~~~~~~~~~~~~~~~
p906.cpp:450:1: error: 'const_reverse_iterator' does not name a type; did you mean 'reverse_iterator'?
  450 | const_reverse_iterator rbegin() const noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~
      | reverse_iterator
p906.cpp:451:1: error: deduced class type 'reverse_iterator' in function return type
  451 | reverse_iterator       rend() noexcept;
      | ^~~~~~~~~~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator.h:132:11: note: 'template<class _Iterator> class std::reverse_iterator' declared here
  132 |     class reverse_iterator
      |           ^~~~~~~~~~~~~~~~
p906.cpp:452:1: error: 'const_reverse_iterator' does not name a type; did you mean 'reverse_iterator'?
  452 | const_reverse_iterator rend() const noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~
      | reverse_iterator
p906.cpp:453:1: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  453 | const_iterator         cbegin() const noexcept;
      | ^~~~~~~~~~~~~~
      | move_iterator
p906.cpp:454:1: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  454 | const_iterator         cend() const noexcept;
      | ^~~~~~~~~~~~~~
      | move_iterator
p906.cpp:455:1: error: 'const_reverse_iterator' does not name a type; did you mean 'reverse_iterator'?
  455 | const_reverse_iterator crbegin() const noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~
      | reverse_iterator
p906.cpp:456:1: error: 'const_reverse_iterator' does not name a type; did you mean 'reverse_iterator'?
  456 | const_reverse_iterator crend() const noexcept;
      | ^~~~~~~~~~~~~~~~~~~~~~
      | reverse_iterator
p906.cpp:459:1: error: 'size_type' does not name a type; did you mean 'true_type'?
  459 | size_type size() const noexcept;
      | ^~~~~~~~~
      | true_type
p906.cpp:460:1: error: 'size_type' does not name a type; did you mean 'true_type'?
  460 | size_type max_size() const noexcept;
      | ^~~~~~~~~
      | true_type
p906.cpp:462:25: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  462 | template<class... Args> iterator emplace(Args&&... args);
      |                         ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:462:25: error: deduced class type 'iterator' in function return type
  462 | template<class... Args> iterator emplace(Args&&... args);
      |                         ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:463:25: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  463 | template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args); iterator insert(const value_type& x);
      |                         ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:463:47: error: 'const_iterator' has not been declared
  463 | template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args); iterator insert(const value_type& x);
      |                                               ^~~~~~~~~~~~~~
p906.cpp:463:25: error: deduced class type 'iterator' in function return type
  463 | template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args); iterator insert(const value_type& x);
      |                         ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:463:89: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  463 | template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args); iterator insert(const value_type& x);
      |                                                                                         ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:463:111: error: 'value_type' does not name a type; did you mean 'false_type'?
  463 | > iterator emplace_hint(const_iterator position, Args&&... args); iterator insert(const value_type& x);
      |                                                                                         ^~~~~~~~~~
      |                                                                                         false_type
p906.cpp:463:89: error: deduced class type 'iterator' in function return type
  463 | template<class... Args> iterator emplace_hint(const_iterator position, Args&&... args); iterator insert(const value_type& x);
      |                                                                                         ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:464:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  464 | iterator insert(value_type&& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:464:17: error: 'value_type' has not been declared
  464 | iterator insert(value_type&& x);
      |                 ^~~~~~~~~~
p906.cpp:464:1: error: deduced class type 'iterator' in function return type
  464 | iterator insert(value_type&& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:465:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  465 | template<class P> iterator insert(P&& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:465:19: error: deduced class type 'iterator' in function return type
  465 | template<class P> iterator insert(P&& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:466:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  466 | iterator insert(const_iterator position, const value_type& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:466:17: error: 'const_iterator' has not been declared
  466 | iterator insert(const_iterator position, const value_type& x);
      |                 ^~~~~~~~~~~~~~
p906.cpp:466:48: error: 'value_type' does not name a type; did you mean 'false_type'?
  466 | iterator insert(const_iterator position, const value_type& x);
      |                                                ^~~~~~~~~~
      |                                                false_type
p906.cpp:466:1: error: deduced class type 'iterator' in function return type
  466 | iterator insert(const_iterator position, const value_type& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:467:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  467 | iterator insert(const_iterator position, value_type&& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:467:17: error: 'const_iterator' has not been declared
  467 | iterator insert(const_iterator position, value_type&& x);
      |                 ^~~~~~~~~~~~~~
p906.cpp:467:42: error: 'value_type' has not been declared
  467 | iterator insert(const_iterator position, value_type&& x);
      |                                          ^~~~~~~~~~
p906.cpp:467:1: error: deduced class type 'iterator' in function return type
  467 | iterator insert(const_iterator position, value_type&& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:468:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  468 | template<class P> iterator insert(const_iterator position, P&& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:468:35: error: 'const_iterator' has not been declared
  468 | template<class P> iterator insert(const_iterator position, P&& x);
      |                                   ^~~~~~~~~~~~~~
p906.cpp:468:19: error: deduced class type 'iterator' in function return type
  468 | template<class P> iterator insert(const_iterator position, P&& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:470:91: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  470 | id insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                                         ^~~~~~~~~~
      |                                                                                         false_type
p906.cpp:470:91: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  470 | id insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                                         ^~~~~~~~~~
      |                                                                                         false_type
p906.cpp:470:91: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  470 | id insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                                         ^~~~~~~~~~
      |                                                                                         false_type
p906.cpp:470:91: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  470 | id insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                                         ^~~~~~~~~~
      |                                                                                         false_type
p906.cpp:470:91: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  470 | id insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                                         ^~~~~~~~~~
      |                                                                                         false_type
p906.cpp:470:91: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  470 | id insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                                         ^~~~~~~~~~
      |                                                                                         false_type
p906.cpp:470:64: error: 'container_compatible_range' has not been declared
  470 | void insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:470:90: error: expected '>' before '<' token
  470 | oid insert(InputIterator first, InputIterator last); template<container_compatible_range<value_type> R>
      |                                                                                         ^

p906.cpp:471:21: error: 'R' has not been declared
  471 |   void insert_range(R&& rg);
      |                     ^
p906.cpp:472:30: error: 'value_type' was not declared in this scope; did you mean 'false_type'?
  472 | void insert(initializer_list<value_type>);
      |                              ^~~~~~~~~~
      |                              false_type
p906.cpp:472:40: error: template argument 1 is invalid
  472 | void insert(initializer_list<value_type>);
      |                                        ^
p906.cpp:473:1: error: 'node_type' does not name a type; did you mean 'true_type'?
  473 | node_type extract(const_iterator position);
      | ^~~~~~~~~
      | true_type
p906.cpp:474:1: error: 'node_type' does not name a type; did you mean 'true_type'?
  474 | node_type extract(const key_type& x);
      | ^~~~~~~~~
      | true_type
p906.cpp:475:19: error: 'node_type' does not name a type; did you mean 'true_type'?
  475 | template<class K> node_type extract(K&& x);
      |                   ^~~~~~~~~
      |                   true_type
p906.cpp:476:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  476 | iterator insert(node_type&& nh);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:476:17: error: 'node_type' has not been declared
  476 | iterator insert(node_type&& nh);
      |                 ^~~~~~~~~
p906.cpp:476:1: error: deduced class type 'iterator' in function return type
  476 | iterator insert(node_type&& nh);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:477:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  477 | iterator insert(const_iterator hint, node_type&& nh);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:477:17: error: 'const_iterator' has not been declared
  477 | iterator insert(const_iterator hint, node_type&& nh);
      |                 ^~~~~~~~~~~~~~
p906.cpp:477:38: error: 'node_type' has not been declared
  477 | iterator insert(const_iterator hint, node_type&& nh);
      |                                      ^~~~~~~~~
p906.cpp:477:1: error: deduced class type 'iterator' in function return type
  477 | iterator insert(const_iterator hint, node_type&& nh);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:478:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  478 | iterator  erase(iterator position);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:478:17: error: class template placeholder 'std::iterator' not permitted in this context
  478 | iterator  erase(iterator position);
      |                 ^~~~~~~~
p906.cpp:478:17: note: use 'auto' for an abbreviated function template
p906.cpp:478:1: error: deduced class type 'iterator' in function return type
  478 | iterator  erase(iterator position);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:479:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  479 | iterator  erase(const_iterator position);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:479:17: error: 'const_iterator' has not been declared
  479 | iterator  erase(const_iterator position);
      |                 ^~~~~~~~~~~~~~
p906.cpp:479:1: error: deduced class type 'iterator' in function return type
  479 | iterator  erase(const_iterator position);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:480:1: error: 'size_type' does not name a type; did you mean 'true_type'?
  480 | size_type erase(const key_type& x);
      | ^~~~~~~~~
      | true_type
p906.cpp:481:19: error: 'size_type' does not name a type; did you mean 'true_type'?
  481 | template<class K> size_type erase(K&& x);
      |                   ^~~~~~~~~
      |                   true_type
p906.cpp:482:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  482 | iterator  erase(const_iterator first, const_iterator last);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:482:17: error: 'const_iterator' has not been declared
  482 | iterator  erase(const_iterator first, const_iterator last);
      |                 ^~~~~~~~~~~~~~
p906.cpp:482:39: error: 'const_iterator' has not been declared
  482 | iterator  erase(const_iterator first, const_iterator last);
      |                                       ^~~~~~~~~~~~~~
p906.cpp:482:1: error: deduced class type 'iterator' in function return type
  482 | iterator  erase(const_iterator first, const_iterator last);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:483:16: error: class template placeholder 'std::multimap' not permitted in this context
  483 | void      swap(multimap&)
      |                ^~~~~~~~
p906.cpp:483:16: note: use 'auto' for an abbreviated function template
p906.cpp:488:23: error: 'Key' was not declared in this scope
  488 |   void merge(multimap<Key, T, C2, Allocator>& source);
      |                       ^~~
p906.cpp:488:28: error: 'T' was not declared in this scope
  488 |   void merge(multimap<Key, T, C2, Allocator>& source);
      |                            ^
p906.cpp:488:44: error: template argument 1 is invalid
  488 |   void merge(multimap<Key, T, C2, Allocator>& source);
      |                                            ^
p906.cpp:488:44: error: template argument 2 is invalid
p906.cpp:490:23: error: 'Key' was not declared in this scope
  490 |   void merge(multimap<Key, T, C2, Allocator>&& source);
      |                       ^~~
p906.cpp:490:28: error: 'T' was not declared in this scope
  490 |   void merge(multimap<Key, T, C2, Allocator>&& source);
      |                            ^
p906.cpp:490:44: error: template argument 1 is invalid
  490 |   void merge(multimap<Key, T, C2, Allocator>&& source);
      |                                            ^
p906.cpp:490:44: error: template argument 2 is invalid
p906.cpp:492:18: error: 'Key' was not declared in this scope
  492 |   void merge(map<Key, T, C2, Allocator>& source);
      |                  ^~~
p906.cpp:492:23: error: 'T' was not declared in this scope
  492 |   void merge(map<Key, T, C2, Allocator>& source);
      |                       ^
p906.cpp:492:39: error: template argument 1 is invalid
  492 |   void merge(map<Key, T, C2, Allocator>& source);
      |                                       ^
p906.cpp:492:39: error: template argument 2 is invalid
p906.cpp:492:8: error: 'template<class C2> void std::value_compare::merge(int&)' cannot be overloaded with template<class C2> void std::value_compare::merge(int&)'
  492 |   void merge(map<Key, T, C2, Allocator>& source);
      |        ^~~~~
p906.cpp:488:8: note: previous declaration 'template<class C2> void std::value_compare::merge(int&)'
  488 |   void merge(multimap<Key, T, C2, Allocator>& source);
      |        ^~~~~
p906.cpp:494:18: error: 'Key' was not declared in this scope
  494 |   void merge(map<Key, T, C2, Allocator>&& source);
      |                  ^~~
p906.cpp:494:23: error: 'T' was not declared in this scope
  494 |   void merge(map<Key, T, C2, Allocator>&& source);
      |                       ^
p906.cpp:494:39: error: template argument 1 is invalid
  494 |   void merge(map<Key, T, C2, Allocator>&& source);
      |                                       ^
p906.cpp:494:39: error: template argument 2 is invalid
p906.cpp:494:8: error: 'template<class C2> void std::value_compare::merge(int&&)' cannot be overloaded with 'template<class C2> void std::value_compare::merge(int&&)'
  494 |   void merge(map<Key, T, C2, Allocator>&& source);
      |        ^~~~~
p906.cpp:490:8: note: previous declaration 'template<class C2> void std::value_compare::merge(int&&)'
  490 |   void merge(multimap<Key, T, C2, Allocator>&& source);
      |        ^~~~~
p906.cpp:496:1: error: 'key_compare' does not name a type; did you mean 'value_compare'?
  496 | key_compare key_comp() const;
      | ^~~~~~~~~~~
      | value_compare
p906.cpp:499:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  499 | iterator       find(const key_type& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:499:27: error: 'key_type' does not name a type; did you mean 'key_t'?
  499 | iterator       find(const key_type& x);
      |                           ^~~~~~~~
      |                           key_t
p906.cpp:499:1: error: deduced class type 'iterator' in function return type
  499 | iterator       find(const key_type& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:500:1: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  500 | const_iterator find(const key_type& x) const;
      | ^~~~~~~~~~~~~~
      | move_iterator
p906.cpp:501:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  501 | template<class K> iterator       find(const K& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:501:19: error: deduced class type 'iterator' in function return type
  501 | template<class K> iterator       find(const K& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:502:19: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  502 | template<class K> const_iterator find(const K& x) const;
      |                   ^~~~~~~~~~~~~~
      |                   move_iterator
p906.cpp:503:1: error: 'size_type' does not name a type; did you mean 'true_type'?
  503 | size_type      count(const key_type& x) const;
      | ^~~~~~~~~
      | true_type
p906.cpp:504:19: error: 'size_type' does not name a type; did you mean 'true_type'?
  504 | template<class K> size_type count(const K& x) const;
      |                   ^~~~~~~~~
      |                   true_type
p906.cpp:505:31: error: 'key_type' does not name a type; did you mean 'key_t'?
  505 | bool           contains(const key_type& x) const;
      |                               ^~~~~~~~
      |                               key_t
p906.cpp:507:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  507 | iterator       lower_bound(const key_type& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:507:34: error: 'key_type' does not name a type; did you mean 'key_t'?
  507 | iterator       lower_bound(const key_type& x);
      |                                  ^~~~~~~~
      |                                  key_t
p906.cpp:507:1: error: deduced class type 'iterator' in function return type
  507 | iterator       lower_bound(const key_type& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:508:1: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  508 | const_iterator lower_bound(const key_type& x) const;
      | ^~~~~~~~~~~~~~
      | move_iterator
p906.cpp:509:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  509 | template<class K> iterator       lower_bound(const K& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:509:19: error: deduced class type 'iterator' in function return type
  509 | template<class K> iterator       lower_bound(const K& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:510:19: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  510 | template<class K> const_iterator lower_bound(const K& x) const;
      |                   ^~~~~~~~~~~~~~
      |                   move_iterator
p906.cpp:511:1: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  511 | iterator       upper_bound(const key_type& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:511:34: error: 'key_type' does not name a type; did you mean 'key_t'?
  511 | iterator       upper_bound(const key_type& x);
      |                                  ^~~~~~~~
      |                                  key_t
p906.cpp:511:1: error: deduced class type 'iterator' in function return type
  511 | iterator       upper_bound(const key_type& x);
      | ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:512:1: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  512 | const_iterator upper_bound(const key_type& x) const;
      | ^~~~~~~~~~~~~~
      | move_iterator
p906.cpp:513:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  513 | template<class K> iterator       upper_bound(const K& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:513:19: error: deduced class type 'iterator' in function return type
  513 | template<class K> iterator       upper_bound(const K& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:514:19: error: 'const_iterator' does not name a type; did you mean 'move_iterator'?
  514 | template<class K> const_iterator upper_bound(const K& x) const;
      |                   ^~~~~~~~~~~~~~
      |                   move_iterator
p906.cpp:515:6: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  515 | pair<iterator, iterator>
      |      ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:515:16: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  515 | pair<iterator, iterator>
      |                ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:515:24: error: type/value mismatch at argument 1 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
  515 | pair<iterator, iterator>
      |                        ^
p906.cpp:515:24: note:   expected a type, got 'iterator'
p906.cpp:515:24: error: type/value mismatch at argument 2 in template parameter list for 'template<class _T1, class _T2> struct std::pair'
p906.cpp:515:24: note:   expected a type, got 'iterator'
p906.cpp:516:6: error: 'const_iterator' was not declared in this scope; did you mean 'move_iterator'?
  516 | pair<const_iterator, const_iterator>
      |      ^~~~~~~~~~~~~~
      |      move_iterator
p906.cpp:516:22: error: 'const_iterator' was not declared in this scope; did you mean 'move_iterator'?
  516 | pair<const_iterator, const_iterator>
      |                      ^~~~~~~~~~~~~~
      |                      move_iterator
p906.cpp:516:36: error: template argument 1 is invalid
  516 | pair<const_iterator, const_iterator>
      |                                    ^
p906.cpp:516:36: error: template argument 2 is invalid
p906.cpp:521:19: error: 'key_type' does not name a type; did you mean 'key_t'?
  521 | equal_range(const key_type& x) const;
      |                   ^~~~~~~~
      |                   key_t
p906.cpp:521:1: error: ISO C++ forbids declaration of 'equal_range' with no type [-fpermissive]
  521 | equal_range(const key_type& x) const;
      | ^~~~~~~~~~~
p906.cpp:522:19: error: 'K' does not name a type
  522 | equal_range(const K& x);
      |                   ^
p906.cpp:522:1: error: ISO C++ forbids declaration of 'equal_range' with no type [-fpermissive]
  522 | equal_range(const K& x);
      | ^~~~~~~~~~~
p906.cpp:523:10: error: 'const_iterator' was not declared in this scope; did you mean 'move_iterator'?
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |          ^~~~~~~~~~~~~~
      |          move_iterator
p906.cpp:523:26: error: 'const_iterator' was not declared in this scope; did you mean 'move_iterator'?
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |                          ^~~~~~~~~~~~~~
      |                          move_iterator
p906.cpp:523:40: error: template argument 1 is invalid
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |                                        ^
p906.cpp:523:40: error: template argument 2 is invalid
p906.cpp:523:60: error: 'K' does not name a type
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |                                                            ^
p906.cpp:523:42: error: 'int std::value_compare::equal_range(const int&) const' cannot be overloaded with 'int std::value_compare::equal_range(const int&) const'
  523 |     pair<const_iterator, const_iterator> equal_range(const K& x) const;
      |                                          ^~~~~~~~~~~
p906.cpp:521:1: note: previous declaration 'int std::value_compare::equal_range(const int&) const'
  521 | equal_range(const key_type& x) const;
      | ^~~~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/ext/alloc_traits.h:34,
                 from /usr/local/include/c++/12.1.0/bits/basic_string.h:40,
                 from /usr/local/include/c++/12.1.0/string:53:
/usr/local/include/c++/12.1.0/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<std::Allocator>':
p906.cpp:484:39:   required from here
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:95:43: error: invalid use of incomplete type 'class std::Allocator'
   95 |       typedef typename _Alloc::value_type value_type;
      |                                           ^~~~~~~~~~
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:102:13: error: invalid use of incomplete type 'class std::Allocator'
  102 |       using pointer = __detected_or_t<value_type*, __pointer, _Alloc>;
      |             ^~~~~~~
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:142:13: error: invalid use of incomplete type 'class std::Allocator'
  142 |       using const_pointer = typename _Ptr<__c_pointer, const value_type>::type;
      |             ^~~~~~~~~~~~~
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<std::Allocator>::_Ptr<std::__allocator_traits_base::__v_pointer, void, void>':
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:150:13:   required from 'struct std::allocator_traits<std::Allocator>'
p906.cpp:484:39:   required from here
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:109:17: error: invalid use of incomplete type 'class std::Allocator'
  109 |           using type = typename pointer_traits<pointer>::template rebind<_Tp>;
      |                 ^~~~
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<std::Allocator>::_Ptr<std::__allocator_traits_base::__cv_pointer, const void, void>':
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:158:13:   required from 'struct std::allocator_traits<std::Allocator>'
p906.cpp:484:39:   required from here
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:109:17: error: invalid use of incomplete type 'class std::Allocator'
  109 |           using type = typename pointer_traits<pointer>::template rebind<_Tp>;
      |                 ^~~~
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<std::Allocator>':
p906.cpp:484:39:   required from here
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:166:13: error: invalid use of incomplete type 'class std::Allocator'
  166 |       using difference_type = typename _Diff<_Alloc, pointer>::type;
      |             ^~~~~~~~~~~~~~~
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:174:13: error: invalid use of incomplete type 'class std::Allocator'
  174 |       using size_type = typename _Size<_Alloc, difference_type>::type;
      |             ^~~~~~~~~
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
In file included from /usr/local/include/c++/12.1.0/bits/move.h:57,
                 from /usr/local/include/c++/12.1.0/bits/exception_ptr.h:43,
                 from /usr/local/include/c++/12.1.0/exception:168,
                 from /usr/local/include/c++/12.1.0/ios:39:
/usr/local/include/c++/12.1.0/type_traits: In instantiation of 'struct std::is_empty<std::Allocator>':
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:209:13:   required from 'struct std::allocator_traits<std::Allocator>'
p906.cpp:484:39:   required from here
/usr/local/include/c++/12.1.0/type_traits:781:38: error: invalid use of incomplete type 'class std::Allocator'
  781 |     : public integral_constant<bool, __is_empty(_Tp)>
      |                                      ^~~~~~~~~~~~~~~
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
/usr/local/include/c++/12.1.0/bits/alloc_traits.h: In instantiation of 'struct std::allocator_traits<std::Allocator>':
p906.cpp:484:39:   required from here
/usr/local/include/c++/12.1.0/bits/alloc_traits.h:209:13: error: no type named 'type' in 'struct std::is_empty<std::Allocator>'
  209 |       using is_always_equal
      |             ^~~~~~~~~~~~~~~
p906.cpp:484:41: error: 'std::allocator_traits<std::Allocator>::is_always_equal' is not a class, namespace, or enumeration
  484 |   noexcept(allocator_traits<Allocator>::is_always_equal::value &&
      |                                         ^~~~~~~~~~~~~~~
p906.cpp:485:35: error: 'Compare' was not declared in this scope
  485 |            is_nothrow_swappable_v<Compare>);
      |                                   ^~~~~~~
p906.cpp:485:12: error: template argument 1 is invalid
  485 |            is_nothrow_swappable_v<Compare>);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:525:111: error: 'iter_to_alloc' was not declared in this scope
  525 | erator, class Compare = less<iter_key_type<InputIterator>>, class Allocator = allocator<iter_to_alloc-type<InputIterator>>>
      |                                                                                         ^~~~~~~~~~~~~

p906.cpp:525:125: error: 'type' was not declared in this scope; did you mean 'std::__cmp_cat::type'?
  525 | Compare = less<iter_key_type<InputIterator>>, class Allocator = allocator<iter_to_alloc-type<InputIterator>>>
      |                                                                                         ^~~~
      |                                                                                         std::__cmp_cat::type
/usr/local/include/c++/12.1.0/compare:51:11: note: 'std::__cmp_cat::type' declared here
   51 |     using type = signed char;
      |           ^~~~
p906.cpp:525:143: error: template argument 1 is invalid
  525 | less<iter_key_type<InputIterator>>, class Allocator = allocator<iter_to_alloc-type<InputIterator>>>
      |                                                                                                 ^~

p906.cpp:526:128: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  526 | Compare = Compare(), Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                         ^~~~~~~~~~~~~~~~
      |                                                                                         iter_value_type
p906.cpp:526:158: error: template argument 2 is invalid
  526 | Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                                  ^

p906.cpp:526:158: error: template argument 4 is invalid
p906.cpp:526:128: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  526 | Compare = Compare(), Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                         ^~~~~~~~~~~~~~~~
      |                                                                                         iter_value_type
p906.cpp:526:158: error: template argument 2 is invalid
  526 | Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                                  ^

p906.cpp:526:158: error: template argument 4 is invalid
p906.cpp:526:128: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  526 | Compare = Compare(), Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                         ^~~~~~~~~~~~~~~~
      |                                                                                         iter_value_type
p906.cpp:526:158: error: template argument 2 is invalid
  526 | Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                                  ^

p906.cpp:526:158: error: template argument 4 is invalid
p906.cpp:526:128: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  526 | Compare = Compare(), Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                         ^~~~~~~~~~~~~~~~
      |                                                                                         iter_value_type
p906.cpp:526:158: error: template argument 2 is invalid
  526 | Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                                  ^

p906.cpp:526:158: error: template argument 4 is invalid
p906.cpp:526:89: error: invalid template-id
  526 | multimap(InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                         ^~~~~~~~
p906.cpp:526:128: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  526 | Compare = Compare(), Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                         ^~~~~~~~~~~~~~~~
      |                                                                                         iter_value_type
p906.cpp:526:158: error: expected primary-expression before '>' token
  526 | Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                                  ^

p906.cpp:526:158: error: trailing return type 'multimap<...auto...>' of deduction guide is not a specialization of 'std::multimap<_Key, _Tp, _Compare, _Alloc>'
p906.cpp:526:159: error: expected ';' before ',' token
  526 | Allocator = Allocator()) -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>,
      |                                                                                                   ^
      |                                                                                                   ;
p906.cpp:528:102: error: 'range_to_alloc_type' was not declared in this scope
  528 | es::input_range R, class Compare = less<range_key_type<R>>, class Allocator = allocator<range_to_alloc_type<R>>>
      |                                                                                         ^~~~~~~~~~~~~~~~~~~

p906.cpp:528:123: error: template argument 1 is invalid
  528 | ge R, class Compare = less<range_key_type<R>>, class Allocator = allocator<range_to_alloc_type<R>>>
      |                                                                                                 ^~

p906.cpp:529:22: error: expected ')' before ',' token
  529 | multimap(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
      |         ~            ^
      |                      )
p906.cpp:537:43: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                           ^~~~~~~~~~~~~~~~
      |                                           iter_value_type
p906.cpp:537:73: error: template argument 2 is invalid
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                         ^
p906.cpp:537:73: error: template argument 4 is invalid
p906.cpp:537:43: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                           ^~~~~~~~~~~~~~~~
      |                                           iter_value_type
p906.cpp:537:73: error: template argument 2 is invalid
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                         ^
p906.cpp:537:73: error: template argument 4 is invalid
p906.cpp:537:43: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                           ^~~~~~~~~~~~~~~~
      |                                           iter_value_type
p906.cpp:537:73: error: template argument 2 is invalid
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                         ^
p906.cpp:537:73: error: template argument 4 is invalid
p906.cpp:537:43: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                           ^~~~~~~~~~~~~~~~
      |                                           iter_value_type
p906.cpp:537:73: error: template argument 2 is invalid
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                         ^
p906.cpp:537:73: error: template argument 4 is invalid
p906.cpp:537:4: error: invalid template-id
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |    ^~~~~~~~
p906.cpp:537:43: error: 'iter_mapped_type' was not declared in this scope; did you mean 'iter_value_type'?
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                           ^~~~~~~~~~~~~~~~
      |                                           iter_value_type
p906.cpp:537:73: error: expected primary-expression before '>' token
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                         ^
p906.cpp:537:73: error: trailing return type 'multimap<...auto...>' of deduction guide is not a specialization of 'std::multimap<_Key, _Tp, _Compare, _Alloc>'
p906.cpp:537:74: error: expected ';' before ',' token
  537 | -> multimap<iter_key_type<InputIterator>, iter_mapped_type<InputIterator>, less<iter_key_type<InputIterator>>, Allocator>;
      |                                                                          ^
      |                                                                          ;
p906.cpp:538:8: error: found ':' in nested-name-specifier, expected '::'
  538 | Effects: Constructs an empty multimap using the specified comparison object and allocator. Complexity: Constant.
      |        ^
      |        ::
p906.cpp:538:1: error: 'Effects' does not name a type
  538 | Effects: Constructs an empty multimap using the specified comparison object and allocator. Complexity: Constant.
      | ^~~~~~~
p906.cpp:547:25: error: 'Compare' does not name a type
  547 | explicit multimap(const Compare& comp, const Allocator& = Allocator());
      |                         ^~~~~~~
p906.cpp:547:69: error: invalid use of incomplete type 'class std::Allocator'
  547 | explicit multimap(const Compare& comp, const Allocator& = Allocator());
      |                                                                     ^
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
p906.cpp:547:10: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  547 | explicit multimap(const Compare& comp, const Allocator& = Allocator());
      |          ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:550:13: error: 'Compare' does not name a type
  550 |       const Compare& comp = Compare(),
      |             ^~~~~~~
p906.cpp:550:29: error: there are no arguments to 'Compare' that depend on a template parameter, so a declaration of 'Compare' must be available [-fpermissive]
  550 |       const Compare& comp = Compare(),
      |                             ^~~~~~~
p906.cpp:549:3: error: deduction guide for 'std::multimap<_Key, _Tp, _Compare, _Alloc>' must have trailing return type
  549 |   multimap(InputIterator first, InputIterator last,
      |   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_map.h:72:11: note: 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::multimap' declared here
   72 |     class multimap;
      |           ^~~~~~~~
p906.cpp:554:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  554 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:554:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  554 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:554:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  554 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:554:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  554 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:554:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  554 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:554:37: error: 'value_type' was not declared in this scope; did you mean 'iter_value_type'?
  554 | template<container_compatible_range<value_type> R>
      |                                     ^~~~~~~~~~
      |                                     iter_value_type
p906.cpp:554:10: error: 'container_compatible_range' has not been declared
  554 | template<container_compatible_range<value_type> R>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
p906.cpp:554:36: error: expected '>' before '<' token
  554 | template<container_compatible_range<value_type> R>
      |                                    ^
p906.cpp:555:22: error: expected ')' before ',' token
  555 | multimap(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
      |         ~            ^
      |                      )
p906.cpp:559:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  559 | template<class P> iterator insert(P&& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:559:19: error: deduced class type 'iterator' in function return type
  559 | template<class P> iterator insert(P&& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:560:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
  560 | template<class P> iterator insert(const_iterator position, P&& x);
      |                   ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
p906.cpp:560:35: error: 'template<class P> iterator<...auto...> insert' conflicts with a previous declaration
  560 | template<class P> iterator insert(const_iterator position, P&& x);
      |                                   ^~~~~~~~~~~~~~
p906.cpp:330:24: note: previous declaration 'int insert(P&&)'
  330 |   pair<iterator, bool> insert(P&& x);
      |                        ^~~~~~
p906.cpp:560:35: error: 'const_iterator' was not declared in this scope
  560 | template<class P> iterator insert(const_iterator position, P&& x);
      |                                   ^~~~~~~~~~~~~~
p906.cpp:560:61: error: expected primary-expression before '&&' token
  560 | template<class P> iterator insert(const_iterator position, P&& x);
      |                                                             ^~
p906.cpp:560:64: error: 'x' was not declared in this scope
  560 | template<class P> iterator insert(const_iterator position, P&& x);
      |                                                                ^
p906.cpp:568:29: error: 'c' was not declared in this scope
  568 |        auto original_size = c.size();
      |                             ^
p906.cpp:569:8: error: expected unqualified-id before 'for'
  569 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |        ^~~
p906.cpp:569:49: error: 'i' does not name a type
  569 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                 ^
p906.cpp:569:60: error: expected unqualified-id before ')' token
  569 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                            ^
p906.cpp:574:8: error: expected unqualified-id before 'return'
  574 |        return original_size - c.size();
      |        ^~~~~~
p906.cpp:580:28: error: redefinition of default argument for 'class Compare'
  580 |        template<class Key, class Compare = less<Key>,
      |                            ^~~~~
p906.cpp:89:21: note: original definition appeared here
   89 | template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                     ^~~~~
p906.cpp:714:8: error: 'iter' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |        ^~~~
p906.cpp:714:13: error: 'value' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |             ^~~~~
p906.cpp:714:19: error: 'type' was not declared in this scope; did you mean 'std::__cmp_cat::type'?
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                   ^~~~
      |                   std::__cmp_cat::type
/usr/local/include/c++/12.1.0/compare:51:11: note: 'std::__cmp_cat::type' declared here
   51 |     using type = signed char;
      |           ^~~~
p906.cpp:714:37: error: template argument 1 is invalid
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                                     ^
p906.cpp:714:37: error: template argument 2 is invalid
p906.cpp:714:37: error: template argument 3 is invalid
p906.cpp:714:8: error: 'iter' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |        ^~~~
p906.cpp:714:13: error: 'value' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |             ^~~~~
p906.cpp:714:19: error: 'type' was not declared in this scope; did you mean 'std::__cmp_cat::type'?
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                   ^~~~
      |                   std::__cmp_cat::type
/usr/local/include/c++/12.1.0/compare:51:11: note: 'std::__cmp_cat::type' declared here
   51 |     using type = signed char;
      |           ^~~~
p906.cpp:714:37: error: template argument 1 is invalid
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                                     ^
p906.cpp:714:37: error: template argument 2 is invalid
p906.cpp:714:37: error: template argument 3 is invalid
p906.cpp:714:8: error: 'iter' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |        ^~~~
p906.cpp:714:13: error: 'value' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |             ^~~~~
p906.cpp:714:19: error: 'type' was not declared in this scope; did you mean 'std::__cmp_cat::type'?
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                   ^~~~
      |                   std::__cmp_cat::type
/usr/local/include/c++/12.1.0/compare:51:11: note: 'std::__cmp_cat::type' declared here
   51 |     using type = signed char;
      |           ^~~~
p906.cpp:714:37: error: template argument 1 is invalid
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                                     ^
p906.cpp:714:37: error: template argument 2 is invalid
p906.cpp:714:37: error: template argument 3 is invalid
p906.cpp:714:8: error: 'iter' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |        ^~~~
p906.cpp:714:13: error: 'value' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |             ^~~~~
p906.cpp:714:19: error: 'type' was not declared in this scope; did you mean 'std::__cmp_cat::type'?
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                   ^~~~
      |                   std::__cmp_cat::type
/usr/local/include/c++/12.1.0/compare:51:11: note: 'std::__cmp_cat::type' declared here
   51 |     using type = signed char;
      |           ^~~~
p906.cpp:714:37: error: template argument 1 is invalid
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                                     ^
p906.cpp:714:37: error: template argument 2 is invalid
p906.cpp:714:37: error: template argument 3 is invalid
p906.cpp:714:4: error: invalid template-id
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |    ^~~
p906.cpp:714:8: error: 'iter' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |        ^~~~
p906.cpp:714:13: error: 'value' was not declared in this scope
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |             ^~~~~
p906.cpp:714:19: error: 'type' was not declared in this scope; did you mean 'std::__cmp_cat::type'?
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                   ^~~~
      |                   std::__cmp_cat::type
/usr/local/include/c++/12.1.0/compare:51:11: note: 'std::__cmp_cat::type' declared here
   51 |     using type = signed char;
      |           ^~~~
p906.cpp:714:37: error: expected primary-expression before '>' token
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                                     ^
p906.cpp:714:37: error: trailing return type 'set<...auto...>' of deduction guide is not a specialization of 'std::set<Key, Compare, Allocator>'
p906.cpp:714:38: error: expected ';' before ',' token
  714 | -> set<iter-value-type<InputIterator>, Compare, Allocator>;
      |                                      ^
      |                                      ;
p906.cpp:717:21: error: expected ')' before ',' token
  717 |     set(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
      |        ~            ^
      |                     )
p906.cpp:726:21: error: expected ')' before ',' token
  726 |     set(from_range_t, R&&, Allocator)
      |        ~            ^
      |                     )
p906.cpp:732:20: error: 'Compare' does not name a type
  732 | explicit set(const Compare& comp, const Allocator& = Allocator());
      |                    ^~~~~~~
p906.cpp:732:64: error: invalid use of incomplete type 'class std::Allocator'
  732 | explicit set(const Compare& comp, const Allocator& = Allocator());
      |                                                                ^
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
p906.cpp:732:10: error: deduction guide for 'std::set<Key, Compare, Allocator>' must have trailing return type
  732 | explicit set(const Compare& comp, const Allocator& = Allocator());
      |          ^~~
p906.cpp:90:7: note: 'template<class Key, class Compare, class Allocator> class std::set' declared here
   90 | class set;
      |       ^~~
p906.cpp:735:13: error: 'Compare' does not name a type
  735 |       const Compare& comp = Compare(), const Allocator& = Allocator());
      |             ^~~~~~~
p906.cpp:735:29: error: there are no arguments to 'Compare' that depend on a template parameter, so a declaration of 'Compare' must be available [-fpermissive]
  735 |       const Compare& comp = Compare(), const Allocator& = Allocator());
      |                             ^~~~~~~
p906.cpp:734:3: error: deduction guide for 'std::set<Key, Compare, Allocator>' must have trailing return type
  734 |   set(InputIterator first, InputIterator last,
      |   ^~~
p906.cpp:90:7: note: 'template<class Key, class Compare, class Allocator> class std::set' declared here
   90 | class set;
      |       ^~~
p906.cpp:738:10: error: 'container' has not been declared
  738 | template<container-compatible-range<value_type> R>
      |          ^~~~~~~~~
p906.cpp:738:19: error: expected '>' before '-' token
  738 | template<container-compatible-range<value_type> R>
      |                   ^
p906.cpp:739:17: error: expected ')' before ',' token
  739 | set(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
      |    ~            ^
      |                 )
p906.cpp:747:29: error: 'c' was not declared in this scope
  747 |        auto original_size = c.size();
      |                             ^
p906.cpp:748:8: error: expected unqualified-id before 'for'
  748 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |        ^~~
p906.cpp:748:49: error: 'i' does not name a type
  748 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                 ^
p906.cpp:748:60: error: expected unqualified-id before ')' token
  748 |        for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                            ^
p906.cpp:753:8: error: expected unqualified-id before 'return'
  753 |        return original_size - c.size();
      |        ^~~~~~
p906.cpp:759:28: error: redefinition of default argument for 'class Compare'
  759 |        template<class Key, class Compare = less<Key>,
      |                            ^~~~~
p906.cpp:104:21: note: original definition appeared here
  104 | template<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>
      |                     ^~~~~
p906.cpp:894:28: error: expected ')' before ',' token
  894 |       multiset(from_range_t, R&&, Compare = Compare(), Allocator = Allocator())
      |               ~            ^
      |                            )
p906.cpp:903:28: error: expected ')' before ',' token
  903 |       multiset(from_range_t, R&&, Allocator)
      |               ~            ^
      |                            )
p906.cpp:909:25: error: 'Compare' does not name a type
  909 | explicit multiset(const Compare& comp, const Allocator& = Allocator());
      |                         ^~~~~~~
p906.cpp:909:69: error: invalid use of incomplete type 'class std::Allocator'
  909 | explicit multiset(const Compare& comp, const Allocator& = Allocator());
      |                                                                     ^
p906.cpp:294:79: note: forward declaration of 'class std::Allocator'
  294 | template<ranges::input_range R, class Compare = less<range_key_type<R>, class Allocator = allocator<range_to_alloc-type<R>>>
      |                                                                               ^~~~~~~~~
p906.cpp:909:10: error: deduction guide for 'std::multiset<Key, Compare, Allocator>' must have trailing return type
  909 | explicit multiset(const Compare& comp, const Allocator& = Allocator());
      |          ^~~~~~~~
p906.cpp:105:13: note: 'template<class Key, class Compare, class Allocator> class std::multiset' declared here
  105 |       class multiset;
      |             ^~~~~~~~
p906.cpp:912:13: error: 'Compare' does not name a type
  912 |       const Compare& comp = Compare(), const Allocator& = Allocator());
      |             ^~~~~~~
p906.cpp:912:29: error: there are no arguments to 'Compare' that depend on a template parameter, so a declaration of 'Compare' must be available [-fpermissive]
  912 |       const Compare& comp = Compare(), const Allocator& = Allocator());
      |                             ^~~~~~~
p906.cpp:911:3: error: deduction guide for 'std::multiset<Key, Compare, Allocator>' must have trailing return type
  911 |   multiset(InputIterator first, InputIterator last,
      |   ^~~~~~~~
p906.cpp:105:13: note: 'template<class Key, class Compare, class Allocator> class std::multiset' declared here
  105 |       class multiset;
      |             ^~~~~~~~
p906.cpp:915:10: error: 'container' has not been declared
  915 | template<container-compatible-range<value_type> R>
      |          ^~~~~~~~~
p906.cpp:915:19: error: expected '>' before '-' token
  915 | template<container-compatible-range<value_type> R>
      |                   ^
p906.cpp:916:22: error: expected ')' before ',' token
  916 | multiset(from_range_t, R&& rg, const Compare& comp = Compare(), const Allocator& = Allocator());
      |         ~            ^
      |                      )
p906.cpp:924:22: error: 'c' was not declared in this scope
  924 | auto original_size = c.size();
      |                      ^
p906.cpp:925:1: error: expected unqualified-id before 'for'
  925 | for (auto i = c.begin(), last = c.end(); i != last; ) {
      | ^~~
p906.cpp:925:42: error: 'i' does not name a type
  925 | for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                          ^
p906.cpp:925:53: error: expected unqualified-id before ')' token
  925 | for (auto i = c.begin(), last = c.end(); i != last; ) {
      |                                                     ^
p906.cpp:931:1: error: expected unqualified-id before 'return'
  931 | return original_size - c.size();
      | ^~~~~~

検討事項(agenda)

コンパイルエラーを取るか、コンパイルエラーの理由を解説する。

参考資料(reference)

関連する自己参照以外は、こちらの先頭に移転。

C言語(C++)に対する誤解、曲解、無理解、爽快。

#include "N4910.h"

C++N4910資料の改善点

dockerにclang

docker gnu(gcc/g++) and llvm(clang/clang++)

コンパイル用shell script C版(clangとgcc)とC++版(clang++とg++)

C++N4910:2022 tag follower 300人超えました。ありがとうございます。

astyle 使ってみた

DoCAP(ドゥーキャップ)って何ですか?

小川メソッド 覚え(書きかけ)

<この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。>

文書履歴(document history)

ver. 0.01 初稿  20220806

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?