はじめに(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.6 Container adaptors [container.adaptors] C++N4910:2022 (642) p949.cpp
算譜(source code)
// 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.6 Container adaptors [container.adaptors] C++N4910:2022 (642) p949.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;
// 24.6.1 In general [container.adaptors.general]
erase_if(unordered_multiset<K, H, P, A>& 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();
// The headers <queue> and <stack> define the container adaptors queue, priority_queue, and stack.
// The container adaptors each take a Container template parameter, and each constructor takes a Container reference argument. This container is copied into the Container member of each adaptor. If the container takes an allocator, then a compatible allocator may be passed in to the adaptor’s constructor. Otherwise, normal copy or move construction is used for the container argument. The first template parameter T of the container adaptors shall denote the same type as Container::value_type.
// For container adaptors, no swap function throws an exception unless that exception is thrown by the swap of the adaptor’s Container or Compare object (if any).
// A constructor template of a container adaptor shall not participate in overload resolution if it has an InputIterator template parameter and a type that does not qualify as an input iterator is deduced for that parameter.
// A deduction guide for a container adaptor shall not participate in overload resolution if any of the following are true:
// — It has a Container template parameter and a type that qualifies as an allocator is deduced for that parameter.
// — It has no Container template parameter, and it has an Allocator template parameter, and a type that does not qualify as an allocator is deduced for that parameter.
// — It has both Container and Allocator template parameters, and uses_allocator_v<Container, Allocator> is false.
// The exposition-only alias template iter-value-type defined in 24.3.1 may appear in deduction guides for container adaptors.
// 24.6.2 Header <queue> synopsis [queue.syn]
#include <compare> // see 17.11.1
#include <initializer_list> // see 17.10.2
namespace std {
template<class T, class Container = deque<T>> class queue;
template<class T, class Container>
bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
bool operator>=(const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, three_way_comparable Container>
compare_three_way_result_t<Container>
operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
template<class T, class Container>
void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
template<class T, class Container, class Alloc>
struct uses_allocator<queue<T, Container>, Alloc>;
template<class T, class Container = vector<T>,
class Compare = less<typename Container::value_type>>
class priority_queue;
template<class T, class Container, class Compare>
void swap(priority_queue<T, Container, Compare>& x,
priority_queue<T, Container, Compare>& y) noexcept(noexcept(x.swap(y)));
template<class T, class Container, class Compare, class Alloc>
struct uses_allocator<priority_queue<T, Container, Compare>, Alloc>;
}
// 24.6.3 Header <stack> synopsis [stack.syn]
#include <compare> // see 17.11.1
#include <initializer_list> // see 17.10.2
namespace std {
template<class T, class Container = deque<T>> class stack;
template<class T, class Container>
bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, three_way_comparable Container>
compare_three_way_result_t<Container>
operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
template<class T, class Container>
void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
template<class T, class Container, class Alloc>
struct uses_allocator<stack<T, Container>, Alloc>;
}
// 24.6.4 Class template queue [queue]
// 24.6.4.1 Definition [queue.defn]
// Any sequence container supporting operations front(), back(), push_back() and pop_front() can be used to instantiate queue. In particular, list (24.3.10) and deque (24.3.8) can be used.
namespace std {
template<class T, class Container = deque<T>>
class queue {
public:
using value_type = typename Container::value_type;
using reference = typename Container::reference;
using const_reference = typename Container::const_reference;
using size_type = typename Container::size_type;
using container_type =
protected:
Container c;
Container;
public:
queue() : queue(Container()) {}
explicit queue(const Container&);
explicit queue(Container&&);
template<class InputIterator> queue(InputIterator first, InputIterator last);
template<container_compatible_range<T> R> queue(from_range_t, R&& rg);
template<class Alloc> explicit queue(const Alloc&);
template<class Alloc> queue(const Container&, const Alloc&);
template<class Alloc> queue(Container&&, const Alloc&);
template<class Alloc> queue(const queue&, const Alloc&);
template<class Alloc> queue(queue&&, const Alloc&);
template<class InputIterator, class Alloc>
queue(InputIterator first, InputIterator last, const Alloc&);
template<container_compatible_range<T> R, class Alloc>
queue(from_range_t, R&& rg, const Alloc&);
[[nodiscard]] bool empty() const {
return c.empty();
}
size_type size() const {
return c.size();
}
reference front() {
return c.front();
}
const_reference front() const {
return c.front();
}
reference back() {
return c.back();
}
const_reference back() const {
return c.back();
}
void push(const value_type& x) {
c.push_back(x);
}
void push(value_type&& x) v
template<container_compatible_range<T> R> void push_range(R&& rg);
template<class... Args>
decltype(auto) emplace(Args&&... args)
{
return c.emplace_back(std::forward<Args>(args)...);
}
void pop() {
c.pop_front();
}
void swap(queue& q) noexcept(is_nothrow_swappable_v<Container>)
{
using std::swap;
swap(c, q.c);
}
};
template<class Container>
queue(Container) -> queue<typename Container::value_type, Container>;
template<class InputIterator>
queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
template<ranges::input_range R>
queue(from_range_t, R&&) -> queue<ranges::range_value_t<R>>;
template<class Container, class Allocator>
queue(Container, Allocator) -> queue<typename Container::value_type, Container>;
template<class InputIterator, class Allocator>
queue(InputIterator, InputIterator, Allocator)
-> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
template<ranges::input_range R, class Allocator>
queue(from_range_t, R&&, Allocator)
-> queue<ranges::range_value_t<R>, deque<ranges::range_value_t<R>, Allocator>>;
template<class T, class Container, class Alloc>
struct uses_allocator<queue<T, Container>, Alloc>
: uses_allocator<Container, Alloc>::type { };
}
// 24.6.4.2 Constructors [queue.cons]
explicit queue(const Container& cont);
// Effects: Initializes c with cont.
explicit queue(Container&& cont);
// Effects: Initializes c with std::move(cont).
template<class InputIterator>
queue(InputIterator first, InputIterator last);
// If uses_allocator_v<container_type, Alloc> is false the constructors in this subclause shall not par- ticipate in overload resolution.
template<class Alloc> explicit queue(const Alloc& a);
// Effects: Initializes c with a.
template<class Alloc> queue(const container_type& cont, const Alloc& a);
// Effects: Initializes c with cont as the first argument and a as the second argument.
template<class Alloc> queue(container_type&& cont, const Alloc& a);
// Effects: Initializes c with std::move(cont) as the first argument and a as the second argument.
template<class Alloc> queue(const queue& q, const Alloc& a);
// Effects: Initializes c with q.c as the first argument and a as the second argument.
// Effects: Initializes c with first as the first argument and last as the second argument.
template<container_compatible_range<T> R>
queue(from_range_t, R&& rg);
// Effects: Initializes c with ranges::to<Container>(std::forward<R>(rg)).
// 24.6.4.3 Constructors with allocators [queue.cons.alloc]
template<class Alloc> queue(queue&& q, const Alloc& a);
// Effects: Initializes c with std::move(q.c) as the first argument and a as the second argument. template<class InputIterator, class Alloc>
queue(InputIterator first, InputIterator last, const Alloc& alloc);
// Effects: Initializes c with first as the first argument, last as the second argument, and alloc as the third argument.
template<container_compatible_range<T> R, class Alloc> queue(from_range_t, R&& rg, const Alloc& a);
// Effects: Initializes c with ranges::to<Container>(std::forward<R>(rg), a).
// 24.6.4.4 Modifiers [queue.mod]
template<container_compatible_range<T> R> void push_range(R&& rg);
// Effects: Equivalent to c.append_range(std::forward<R>(rg)) if that is a valid expression, otherwise ranges::copy(rg, back_inserter(c)).
// 24.6.4.5 Operators [queue.ops]
template<class T, class Container>
bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
// Returns: x.c == y.c. template<class T, class Container>
bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
// Returns: x.c != y.c. template<class T, class Container>
bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
// Returns: x.c < y.c. template<class T, class Container>
bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
// Returns: x.c > y.c. template<class T, class Container>
bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
// Returns: x.c <= y.c.
template<class T, class Container>
bool operator>=(const queue<T, Container>& x,
const queue<T, Container>& y);
// Returns: x.c >= y.c.
template<class T, three_way_comparable Container>
compare_three_way_result_t<Container>
operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
// Returns: x.c <=> y.c.
// 24.6.4.6 Specialized algorithms [queue.special]
template<class T, class Container>
void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
// Constraints: is_swappable_v<Container> is true. Effects: As if by x.swap(y).
// 24.6.5 Class template priority_queue [priority.queue]
// 24.6.5.1 Overview [priqueue.overview]
// Any sequence container with random access iterator and supporting operations front(), push_back() and pop_back() can be used to instantiate priority_queue. In particular, vector (24.3.11) and deque (24.3.8) can be used. Instantiating priority_queue also involves supplying a function or function object for making priority comparisons; the library assumes that the function or function object defines a strict weak ordering (27.8).
namespace std {
template<class T, class Container = vector<T>,
class Compare = less<typename Container::value_type>>
class priority_queue {
public:
using value_type = typename Container::value_type;
using reference = typename Container::reference;
using const_reference = typename Container::const_reference;
using size_type = typename Container::size_type;
using container_type = Container;
using value_compare = Compare;
protected:
Container c;
Compare comp;
public:
priority_queue() : priority_queue(Compare()) {}
explicit priority_queue(const Compare& x) : priority_queue(x, Container()) {}
priority_queue(const Compare& x, const Container&);
priority_queue(const Compare& x, Container&&);
template<class InputIterator>
priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare());
template<class InputIterator>
priority_queue(InputIterator first, InputIterator last, const Compare& x,
const Container&);
template<class InputIterator>
priority_queue(InputIterator first, InputIterator last, const Compare& x,
Container&&);
template<container-compatible-range<T> R>
priority_queue(from_range_t, R&& rg, const Compare& x = Compare());
template<class Alloc> explicit priority_queue(const Alloc&);
template<class Alloc> priority_queue(const Compare&, const Alloc&);
template<class Alloc> priority_queue(const Compare&, const Container&, const Alloc&);
template<class Alloc> priority_queue(const Compare&, Container&&, const Alloc&);
template<class Alloc> priority_queue(const priority_queue&, const Alloc&);
template<class Alloc> priority_queue(priority_queue&&, const Alloc&);
template<class InputIterator, class Alloc>
priority_queue(InputIterator, InputIterator, const Alloc&);
template<class InputIterator, class Alloc>
priority_queue(InputIterator, InputIterator, const Compare&, const Alloc&);
template<class InputIterator, class Alloc>
priority_queue(InputIterator, InputIterator, const Compare&, const Container&,
const Alloc&);
template<class InputIterator, class Alloc>
priority_queue(InputIterator, InputIterator, const Compare&, Container&&, const Alloc&);
template<container-compatible-range<T> R, class Alloc>
priority_queue(from_range_t, R&& rg, const Compare&, const Alloc&);
template<container-compatible-range<T> R, class Alloc>
priority_queue(from_range_t, R&& rg, const Alloc&);
[[nodiscard]] bool empty() const {
return c.empty();
}
size_type size() const
const_reference top() const
void push(const value_type& x);
{
return c.size();
}
{
return c.front();
}
void push(value_type&& x);
template<container-compatible-range<T> R>
void push_range(R&& rg);
template<class... Args> void emplace(Args&&... args);
void pop();
void swap(priority_queue& q) noexcept(is_nothrow_swappable_v<Container> &&
is_nothrow_swappable_v<Compare>)
{
using std::swap;
swap(c, q.c);
swap(comp, q.comp);
}
};
template<class Compare, class Container>
priority_queue(Compare, Container)
-> priority_queue<typename Container::value_type, Container, Compare>;
template<class InputIterator,
class Compare = less<iter_value_type<InputIterator>>, class Container = vector<iter_value_type<InputIterator>>>
priority_queue(InputIterator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>
priority_queue(from_range_t, R&&, Compare = Compare())
-> priority_queue<ranges::range_value_t<R>, vector<ranges::range_value_t<R>>, Compare>;
template<class Compare, class Container, class Allocator>
priority_queue(Compare, Container, Allocator)
-> priority_queue<typename Container::value_type, Container, Compare>;
template<class InputIterator, class Allocator>
priority_queue(InputIterator, InputIterator, Allocator)
-> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
less<iter_value_type <InputIterator>>>;
template<class InputIterator, class Compare, class Allocator>
priority_queue(InputIterator, InputIterator, Compare, Allocator)
-> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
template<class InputIterator, class Compare, class Container, class Allocator>
priority_queue(InputIterator, InputIterator, Compare, Container, Allocator)
-> priority_queue<typename Container::value_type, Container, Compare>;
template<ranges::input_range R, class Compare, class Allocator>
priority_queue(from_range_t, R&&, Compare, Allocator)
-> priority_queue<ranges::range_value_t<R>, vector<ranges::range_value_t<R>, Allocator>,
Compare>;
template<ranges::input_range R, class Allocator>
priority_queue(from_range_t, R&&, Allocator)
-> priority_queue<ranges::range_value_t<R>, vector<ranges::range_value_t<R>, Allocator>>;
// no equality is provided
template<class T, class Container, class Compare, class Alloc>
struct uses_allocator<priority_queue<T, Container, Compare>, Alloc>
: uses_allocator<Container, Alloc>::type { };
}
// 24.6.5.2 Constructors [priqueue.cons]
priority_queue(const Compare& x, const Container& y);
priority_queue(const Compare& x, Container&& y);
// Preconditions: x defines a strict weak ordering (27.8).
priority_queue(const Compare& compare, const Container& cont, const Alloc& a);
// Effects: Initializes c with cont as the first argument and a as the second argument, and initializes comp with compare; calls make_heap(c.begin(), c.end(), comp).
// Effects: Initializes comp with x and c with y (copy constructing or move constructing as appropriate); calls make_heap(c.begin(), c.end(), comp).
// If uses_allocator_v<container_type, Alloc> is false the constructors in this subclause shall not par- ticipate in overload resolution.
template<class Alloc> explicit priority_queue(const Alloc& a);
// Effects: Initializes c with a and value-initializes comp.
template<class Alloc> priority_queue(const Compare& compare, const Alloc& a);
// Effects: Initializes c with a and initializes comp with compare. template<class Alloc>
template<class InputIterator>
priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare());
// Preconditions: x defines a strict weak ordering (27.8).
// Effects: Initializes c with first as the first argument and last as the second argument, and initializes
comp with x;
then calls make_heap(c.begin(), c.end(), comp).
template<class InputIterator>
priority_queue(InputIterator first, InputIterator last, const Compare& x, const Container& y);
template<class InputIterator>
priority_queue(InputIterator first, InputIterator last, const Compare& x, Container&& y);
// Preconditions: x defines a strict weak ordering (27.8).
// Effects: Initializes comp with x and c with y (copy constructing or move constructing as appropriate);
calls c.insert(c.end(), first, last);
and finally calls make_heap(c.begin(), c.end(), comp). template<container-compatible-range<T> R>
priority_queue(from_range_t, R&& rg, const Compare& x = Compare());
// Preconditions: x defines a strict weak ordering (27.8).
// Effects: Initializes comp with x and c with ranges::to<Container>(std::forward<R>(rg)) and
finally calls make_heap(c.begin(), c.end(), comp).
// 24.6.5.3 Constructors with allocators [priqueue.cons.alloc]
template<class Alloc>
priority_queue(const Compare& compare, Container&& cont, const Alloc& a);
// Effects: Initializes c with std::move(cont) as the first argument and a as the second argument, and initializes comp with compare; calls make_heap(c.begin(), c.end(), comp).
template<class Alloc> priority_queue(const priority_queue& q, const Alloc& a);
// Effects: Initializes c with q.c as the first argument and a as the second argument, and initializes comp with q.comp.
template<class Alloc> priority_queue(priority_queue&& q, const Alloc& a);
// Effects: Initializes c with std::move(q.c) as the first argument and a as the second argument, and initializes comp with std::move(q.comp).
template<class InputIterator, class Alloc>
priority_queue(InputIterator first, InputIterator last, const Alloc& a);
// Effects: Initializes c with first as the first argument, last as the second argument, and a as the third argument, and value-initializes comp; calls make_heap(c.begin(), c.end(), comp).
template<class InputIterator, class Alloc>
priority_queue(InputIterator first, InputIterator last, const Compare& compare, const Alloc& a);
// Effects: Initializes c with first as the first argument, last as the second argument, and a as the third argument, and initializes comp with compare; calls make_heap(c.begin(), c.end(), comp).
template<class InputIterator, class Alloc>
priority_queue(InputIterator first, InputIterator last, const Compare& compare,
const Container& cont, const Alloc& a);
// Effects: Initializes c with cont as the first argument and a as the second argument, and initializes comp with compare; calls c.insert(c.end(), first, last); and finally calls make_heap(c.begin(), c.end(), comp).
template<class InputIterator, class Alloc>
priority_queue(InputIterator first, InputIterator last, const Compare& compare, Container&& cont,
const Alloc& a);
// Effects: Initializes c with std::move(cont) as the first argument and a as the second argument, and initializes comp with compare; calls c.insert(c.end(), first, last); and finally calls make_- heap(c.begin(), c.end(), comp).
template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Compare& compare, const Alloc& a);
// Effects: Initializes comp with compare and c with ranges::to<Container>(std::forward<R>(rg), a); calls make_heap(c.begin(), c.end(), comp).
template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Alloc& a);
// Effects: Initializes c with ranges::to<Container>(std::forward<R>(rg), a); calls make_heap(c. begin(), c.end(), comp).
// 24.6.5.4 Members [priqueue.members]
void push(const value_type& x);
// Effects: As if by: c.push_back(x);
push_heap(c.begin(), c.end(), comp);
void push(value_type&& x);
// Effects: As if by: c.push_back(std::move(x));
push_heap(c.begin(), c.end(), comp);
template<container-compatible-range<T> R> void push_range(R&& rg);
// Effects: Insert all elements of rg in c.
// Postconditions: is_heap(c.begin(), c.end(), comp) is true.
template<class... Args> void emplace(Args&&... args);
// Effects: As if by: c.emplace_back(std::forward<Args>(args)...);
push_heap(c.begin(), c.end(), comp);
void pop();
// Effects: As if by:
pop_heap(c.begin(), c.end(), comp);
c.pop_back();
// 24.6.5.5 Specialized algorithms [priqueue.special]
template<class T, class Container, class Compare>
void swap(priority_queue<T, Container, Compare>& x,
priority_queue<T, Container, Compare>& y) noexcept(noexcept(x.swap(y)));
// Constraints: is_swappable_v<Container> is true and is_swappable_v<Compare> is true. Effects: As if by x.swap(y).
// Any sequence container supporting operations back(), push_back() and pop_back() can be used to instan- tiate stack. In particular, vector (24.3.11), list (24.3.10) and deque (24.3.8) can be used.
// 24.6.6.2 Definition [stack.defn]
namespace std {
template<class T, class Container = deque<T>>
class stack {
public:
using value_type = typename Container::value_type;
using reference = typename Container::reference;
using const_reference = typename Container::const_reference;
using size_type = typename Container::size_type;
using container_type = Container;
protected:
Container c;
public:
stack() : stack(Container()) {}
explicit stack(const Container&);
explicit stack(Container&&);
template<class InputIterator> stack(InputIterator first, InputIterator last);
template<container-compatible-range<T> R> stack(from_range_t, R&& rg);
template<class Alloc> explicit stack(const Alloc&);
template<class Alloc> stack(const Container&, const Alloc&);
template<class Alloc> stack(Container&&, const Alloc&);
template<class Alloc> stack(const stack&, const Alloc&);
template<class Alloc> stack(stack&&, const Alloc&);
template<class InputIterator, class Alloc>
stack(InputIterator first, InputIterator last, const Alloc&);
template<container-compatible-range<T> R, class Alloc>
stack(from_range_t, R&& rg, const Alloc&);
void push_range(R&& rg);
template<class... Args>
decltype(auto) emplace(Args&&... args)
{
return c.emplace_back(std::forward<Args>(args)...);
}
void pop() {
c.pop_back();
}
void swap(stack& s) noexcept(is_nothrow_swappable_v<Container>)
{
using std::swap;
swap(c, s.c);
}
};
template<class Container>
stack(Container) -> stack<typename Container::value_type, Container>;
// 24.6.6 Class template stack [stack]
// 24.6.6.1 General [stack.general]
[[nodiscard]] bool empty() const size_type size() const
ref push(const value_type& x)
void push(value_type&& x) template<container-compatible-range<T> R>
{ return c.empty(); }
{ return c.size(); }
{ return c.back(); }
{ return c.back(); }
{ c.push_back(x); }
{ c.push_back(std::move(x)); }
// Effects: Initializes c with std::move(s.c) as the first argument and a as the second argument.
template<class InputIterator>
stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
template<ranges::input_range R>
stack(from_range_t, R&&) -> stack<ranges::range_value_t<R>>;
template<class Container, class Allocator>
stack(Container, Allocator) -> stack<typename Container::value_type, Container>;
template<class InputIterator, class Allocator>
stack(InputIterator, InputIterator, Allocator)
-> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
template<ranges::input_range R, class Allocator>
stack(from_range_t, R&&, Allocator)
-> stack<ranges::range_value_t<R>, deque<ranges::range_value_t<R>, Allocator>>;
template<class T, class Container, class Alloc>
struct uses_allocator<stack<T, Container>, Alloc>
: uses_allocator<Container, Alloc>::type { };
}
// 24.6.6.3 Constructors [stack.cons]
explicit stack(const Container& cont);
// Effects: Initializes c with cont. explicit stack(Container&& cont);
// Effects: Initializes c with std::move(cont). template<class InputIterator>
stack(InputIterator first, InputIterator last);
// If uses_allocator_v<container_type, Alloc> is false the constructors in this subclause shall not par- ticipate in overload resolution.
template<class Alloc> explicit stack(const Alloc& a);
// Effects: Initializes c with a.
template<class Alloc> stack(const container_type& cont, const Alloc& a);
// Effects: Initializes c with cont as the first argument and a as the second argument. template<class Alloc> stack(container_type&& cont, const Alloc& a);
// Effects: Initializes c with std::move(cont) as the first argument and a as the second argument. template<class Alloc> stack(const stack& s, const Alloc& a);
// Effects: Initializes c with s.c as the first argument and a as the second argument. template<class Alloc> stack(stack&& s, const Alloc& a);
// Effects: Initializes c with first as the first argument and last as the second argument. template<container-compatible-range<T> R>
stack(from_range_t, R&& rg);
// Effects: Initializes c with ranges::to<Container>(std::forward<R>(rg)).
// 24.6.6.4 Constructors with allocators [stack.cons.alloc]
template<class InputIterator, class Alloc>
stack(InputIterator first, InputIterator last, const Alloc& alloc);
// Effects: Initializes c with first as the first argument, last as the second argument, and alloc as the third argument.
template<container-compatible-range<T> R, class Alloc> stack(from_range_t, R&& rg, const Alloc& a);
// Effects: Initializes c with ranges::to<Container>(std::forward<R>(rg), a).
// 24.6.6.5 Modifiers [stack.mod]
template<container-compatible-range<T> R> void push_range(R&& rg);
// Effects: Equivalent to c.append_range(std::forward<R>(rg)) if that is a valid expression, otherwise ranges::copy(rg, back_inserter(c)).
// 24.6.6.6 Operators [stack.ops]
template<class T, class Container>
bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
// Returns: x.c == y.c. template<class T, class Container>
bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
// Returns: x.c != y.c. template<class T, class Container>
bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
// Returns: x.c < y.c. template<class T, class Container>
bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
// Returns: x.c > y.c. template<class T, class Container>
bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
// Returns: x.c <= y.c. template<class T, class Container>
bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
// Returns: x.c >= y.c.
template<class T, three_way_comparable Container>
compare_three_way_result_t<Container>
operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
// Returns: x.c <=> y.c.
// 24.6.6.7 Specialized algorithms [stack.special]
template<class T, class Container>
void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
// Constraints: is_swappable_v<Container> is true. Effects: As if by x.swap(y).
int main() {
cout << n4910 << endl;
return EXIT_SUCCESS;
}
編纂・実行結果(compile and go)
$ clang++ p949.cpp -std=03 -o p949l -I. -Wall
In file included from p949.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 \
^
p949.cpp:15:29: error: use of undeclared identifier 'K'
erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
^
p949.cpp:15:45: error: unknown type name 'Predicate'
erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
^
p949.cpp:15:1: error: C++ requires a type specifier for all declarations
erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
^
p949.cpp:17:4: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
auto original_size = c.size();
^
p949.cpp:17:25: error: use of undeclared identifier 'c'
auto original_size = c.size();
^
p949.cpp:18:4: error: expected unqualified-id
for (auto i = c.begin(), last = c.end(); i != last; ) {
^
p949.cpp:23:4: error: expected unqualified-id
return original_size - c.size();
^
p949.cpp:37:48: error: a space is required between consecutive right angle brackets (use '> >')
template<class T, class Container = deque<T>> class queue;
^~
> >
p949.cpp:37:41: error: no template named 'deque'
template<class T, class Container = deque<T>> class queue;
^
p949.cpp:50:23: error: unknown type name 'three_way_comparable'
template<class T, three_way_comparable Container>
^
p949.cpp:51:7: error: no template named 'compare_three_way_result_t'
compare_three_way_result_t<Container>
^
p949.cpp:52:17: warning: '<=>' is a single token in C++20; add a space to avoid a change in behavior [-Wc++20-compat]
operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
^
p949.cpp:52:9: error: 'operator<=' cannot be the name of a variable or data member
operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
^
p949.cpp:52:19: error: expected ';' at end of declaration
operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
^
;
p949.cpp:52:19: error: expected unqualified-id
p949.cpp:54:64: error: expected ';' at end of declaration
void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
^
;
p949.cpp:54:65: error: C++ requires a type specifier for all declarations
void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
^
p949.cpp:54:83: error: use of undeclared identifier 'x'
void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
^
p949.cpp:54:90: error: use of undeclared identifier 'y'
void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
^
p949.cpp:56:14: error: no template named 'uses_allocator'; did you mean '__gnu_cxx::new_allocator'?
struct uses_allocator<queue<T, Container>, Alloc>;
^~~~~~~~~~~~~~
__gnu_cxx::new_allocator
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/new_allocator.h:55:11: note: '__gnu_cxx::new_allocator' declared here
class new_allocator
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
$ clang++ p949.cpp -std=2b -o p949l -I. -Wall
p949.cpp:15:29: error: use of undeclared identifier 'K'
erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
^
p949.cpp:15:45: error: unknown type name 'Predicate'
erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
^
p949.cpp:15:1: error: C++ requires a type specifier for all declarations
erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
^
p949.cpp:17:25: error: use of undeclared identifier 'c'
auto original_size = c.size();
^
p949.cpp:18:4: error: expected unqualified-id
for (auto i = c.begin(), last = c.end(); i != last; ) {
^
p949.cpp:23:4: error: expected unqualified-id
return original_size - c.size();
^
p949.cpp:37:41: error: no template named 'deque'
template<class T, class Container = deque<T>> class queue;
^
p949.cpp:70:41: error: no template named 'deque'
template<class T, class Container = deque<T>> class stack;
^
p949.cpp:95:44: error: no template named 'deque'
template<class T, class Container = deque<T>>
^
p949.cpp:103:1: error: expected a type
protected:
^
p949.cpp:102:26: error: expected ';' after alias declaration
using container_type =
^
;
p949.cpp:105:1: warning: declaration does not declare anything [-Wmissing-declarations]
Container;
^~~~~~~~~
p949.cpp:110:88: error: no template named 'container_compatible_range'
template<class InputIterator> queue(InputIterator first, InputIterator last); template<container_compatible_range<T> R> queue(from_range_t, R&& rg); template<class Alloc> explicit queue(const Alloc&);
^
p949.cpp:110:127: error: unknown type name 'from_range_t'
template<class InputIterator> queue(InputIterator first, InputIterator last); template<container_compatible_range<T> R> queue(from_range_t, R&& rg); template<class Alloc> explicit queue(const Alloc&);
^
p949.cpp:110:141: error: unknown type name 'R'
template<class InputIterator> queue(InputIterator first, InputIterator last); template<container_compatible_range<T> R> queue(from_range_t, R&& rg); template<class Alloc> explicit queue(const Alloc&);
^
p949.cpp:116:72: error: no template named 'container_compatible_range'
queue(InputIterator first, InputIterator last, const Alloc&); template<container_compatible_range<T> R, class Alloc>
^
p949.cpp:117:11: error: unknown type name 'from_range_t'
queue(from_range_t, R&& rg, const Alloc&);
^
p949.cpp:117:25: error: unknown type name 'R'
queue(from_range_t, R&& rg, const Alloc&);
^
p949.cpp:125:26: error: expected ';' at end of declaration list
void push(value_type&& x) v
^
;
p949.cpp:118:45: error: use of undeclared identifier 'c'
[[nodiscard]] bool empty() const { return c.empty(); }
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
$ g++ p949.cpp -std=03 -o p949g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
from N4910.h:11,
from p949.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 \
| ^~~~~
p949.cpp:54:65: warning: identifier 'noexcept' is a keyword in C++11 [-Wc++11-compat]
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~~~~
p949.cpp:127:5: warning: identifier 'decltype' is a keyword in C++11 [-Wc++11-compat]
127 | decltype(auto) emplace(Args&&... args)
| ^~~~~~~~
p949.cpp:15:9: error: expected constructor, destructor, or type conversion before '(' token
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:17:4: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
17 | auto original_size = c.size();
| ^~~~
| ----
p949.cpp:17:9: error: 'original_size' does not name a type
17 | auto original_size = c.size();
| ^~~~~~~~~~~~~
p949.cpp:18:4: error: expected unqualified-id before 'for'
18 | for (auto i = c.begin(), last = c.end(); i != last; ) {
| ^~~
p949.cpp:18:45: error: 'i' does not name a type
18 | for (auto i = c.begin(), last = c.end(); i != last; ) {
| ^
p949.cpp:18:56: error: expected unqualified-id before ')' token
18 | for (auto i = c.begin(), last = c.end(); i != last; ) {
| ^
p949.cpp:23:4: error: expected unqualified-id before 'return'
23 | return original_size - c.size();
| ^~~~~~
p949.cpp:37:41: error: 'deque' does not name a type
37 | template<class T, class Container = deque<T>> class queue;
| ^~~~~
p949.cpp:37:46: error: expected '>' before '<' token
37 | template<class T, class Container = deque<T>> class queue;
| ^
p949.cpp:37:62: error: expected unqualified-id before ';' token
37 | template<class T, class Container = deque<T>> class queue;
| ^
p949.cpp:39:29: error: 'queue' does not name a type
39 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:39:34: error: expected ',' or '...' before '<' token
39 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:39:12: error: 'bool std::operator==(int)' must have an argument of class or enumerated type
39 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:41:29: error: 'queue' does not name a type
41 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:41:34: error: expected ',' or '...' before '<' token
41 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:41:12: error: 'bool std::operator!=(int)' must have an argument of class or enumerated type
41 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:43:29: error: 'queue' does not name a type
43 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:43:34: error: expected ',' or '...' before '<' token
43 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:43:12: error: 'bool std::operator<(int)' must have an argument of class or enumerated type
43 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:45:29: error: 'queue' does not name a type
45 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:45:34: error: expected ',' or '...' before '<' token
45 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:45:12: error: 'bool std::operator>(int)' must have an argument of class or enumerated type
45 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:47:29: error: 'queue' does not name a type
47 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:47:34: error: expected ',' or '...' before '<' token
47 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:47:12: error: 'bool std::operator<=(int)' must have an argument of class or enumerated type
47 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:49:29: error: 'queue' does not name a type
49 | bool operator>=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:49:34: error: expected ',' or '...' before '<' token
49 | bool operator>=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:49:12: error: 'bool std::operator>=(int)' must have an argument of class or enumerated type
49 | bool operator>=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:50:23: error: 'three_way_comparable' has not been declared
50 | template<class T, three_way_comparable Container>
| ^~~~~~~~~~~~~~~~~~~~
p949.cpp:51:7: error: 'compare_three_way_result_t' does not name a type
51 | compare_three_way_result_t<Container>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:54:12: error: variable or field 'swap' declared void
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~
p949.cpp:54:17: error: 'queue' was not declared in this scope
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~
p949.cpp:36:1: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
35 | #include <initializer_list> // see 17.10.2
+++ |+#include <queue>
36 | namespace std {
p949.cpp:54:24: error: expected primary-expression before ',' token
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:35: error: expected primary-expression before '>' token
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:38: error: 'x' was not declared in this scope
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:41: error: 'queue' was not declared in this scope
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~
p949.cpp:54:41: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
p949.cpp:54:48: error: expected primary-expression before ',' token
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:59: error: expected primary-expression before '>' token
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:62: error: 'y' was not declared in this scope
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:56:14: error: 'uses_allocator' is not a class template
56 | struct uses_allocator<queue<T, Container>, Alloc>;
| ^~~~~~~~~~~~~~
p949.cpp:56:29: error: 'queue' was not declared in this scope
56 | struct uses_allocator<queue<T, Container>, Alloc>;
| ^~~~~
p949.cpp:56:29: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
p949.cpp:56:28: error: expected ';' before ',' token
56 | struct uses_allocator<queue<T, Container>, Alloc>;
| ^ ~
| ;
p949.cpp:58:65: error: spurious '>>', use '>' to terminate a template argument list
58 | class Compare = less<typename Container::value_type>>
| ^~
p949.cpp:58:30: error: two or more data types in declaration of 'type name'
58 | class Compare = less<typename Container::value_type>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:59:27: error: expected '>' before ';' token
59 | class priority_queue;
| ^
p949.cpp:59:27: error: expected unqualified-id before ';' token
p949.cpp:61:17: error: 'std::priority_queue' is not a template
61 | void swap(priority_queue<T, Container, Compare>& x,
| ^~~~~~~~~~~~~~
p949.cpp:62:17: error: 'std::priority_queue' is not a template
62 | priority_queue<T, Container, Compare>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~~~~~~~~~~
p949.cpp:62:59: error: expected initializer before 'noexcept'
62 | priority_queue<T, Container, Compare>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~~~~
p949.cpp:64:14: error: 'uses_allocator' is not a class template
64 | struct uses_allocator<priority_queue<T, Container, Compare>, Alloc>;
| ^~~~~~~~~~~~~~
p949.cpp:64:29: error: 'std::priority_queue' is not a template
64 | struct uses_allocator<priority_queue<T, Container, Compare>, Alloc>;
| ^~~~~~~~~~~~~~
p949.cpp:64:14: error: 'std::uses_allocator' is not a template
64 | struct uses_allocator<priority_queue<T, Container, Compare>, Alloc>;
| ^~~~~~~~~~~~~~
p949.cpp:56:14: note: previous declaration here
56 | struct uses_allocator<queue<T, Container>, Alloc>;
| ^~~~~~~~~~~~~~
p949.cpp:70:41: error: 'deque' does not name a type
70 | template<class T, class Container = deque<T>> class stack;
| ^~~~~
p949.cpp:70:46: error: expected '>' before '<' token
70 | template<class T, class Container = deque<T>> class stack;
| ^
p949.cpp:70:62: error: expected unqualified-id before ';' token
70 | template<class T, class Container = deque<T>> class stack;
| ^
p949.cpp:72:29: error: 'stack' does not name a type; did you mean 'obstack'?
72 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:72:34: error: expected ',' or '...' before '<' token
72 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:72:12: error: 'bool std::operator==(int)' must have an argument of class or enumerated type
72 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:74:29: error: 'stack' does not name a type; did you mean 'obstack'?
74 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:74:34: error: expected ',' or '...' before '<' token
74 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:74:12: error: 'bool std::operator!=(int)' must have an argument of class or enumerated type
74 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:76:29: error: 'stack' does not name a type; did you mean 'obstack'?
76 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:76:34: error: expected ',' or '...' before '<' token
76 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:76:12: error: 'bool std::operator<(int)' must have an argument of class or enumerated type
76 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:78:32: error: 'stack' does not name a type; did you mean 'obstack'?
78 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:78:37: error: expected ',' or '...' before '<' token
78 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:78:15: error: 'bool std::operator>(int)' must have an argument of class or enumerated type
78 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:80:32: error: 'stack' does not name a type; did you mean 'obstack'?
80 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:80:37: error: expected ',' or '...' before '<' token
80 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:80:15: error: 'bool std::operator<=(int)' must have an argument of class or enumerated type
80 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:82:32: error: 'stack' does not name a type; did you mean 'obstack'?
82 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:82:37: error: expected ',' or '...' before '<' token
82 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:82:15: error: 'bool std::operator>=(int)' must have an argument of class or enumerated type
82 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:83:26: error: 'three_way_comparable' has not been declared
83 | template<class T, three_way_comparable Container>
| ^~~~~~~~~~~~~~~~~~~~
p949.cpp:84:10: error: 'compare_three_way_result_t' does not name a type
84 | compare_three_way_result_t<Container>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:87:15: error: variable or field 'swap' declared void
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~
p949.cpp:87:20: error: 'stack' was not declared in this scope
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~
p949.cpp:36:1: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
35 | #include <initializer_list> // see 17.10.2
+++ |+#include <stack>
36 | namespace std {
p949.cpp:87:27: error: expected primary-expression before ',' token
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:38: error: expected primary-expression before '>' token
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:41: error: 'x' was not declared in this scope
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:44: error: 'stack' was not declared in this scope
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~
p949.cpp:87:44: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
p949.cpp:87:51: error: expected primary-expression before ',' token
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:62: error: expected primary-expression before '>' token
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:65: error: 'y' was not declared in this scope
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:89:17: error: 'uses_allocator' is not a class template
89 | struct uses_allocator<stack<T, Container>, Alloc>;
| ^~~~~~~~~~~~~~
p949.cpp:89:32: error: 'stack' was not declared in this scope
89 | struct uses_allocator<stack<T, Container>, Alloc>;
| ^~~~~
p949.cpp:89:32: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
p949.cpp:89:31: error: expected ';' before ',' token
89 | struct uses_allocator<stack<T, Container>, Alloc>;
| ^ ~
| ;
p949.cpp:95:44: error: 'deque' does not name a type
95 | template<class T, class Container = deque<T>>
| ^~~~~
p949.cpp:95:49: error: expected '>' before '<' token
95 | template<class T, class Container = deque<T>>
| ^
p949.cpp:96:20: error: expected unqualified-id before '{' token
96 | class queue {
| ^
p949.cpp:134:27: error: 'queue' does not name a type
134 | queue(Container) -> queue<typename Container::value_type, Container>;
| ^~~~~
p949.cpp:134:32: error: expected constructor, destructor, or type conversion before '<' token
134 | queue(Container) -> queue<typename Container::value_type, Container>;
| ^
p949.cpp:136:40: error: 'queue' does not name a type
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^~~~~
p949.cpp:136:45: error: expected constructor, destructor, or type conversion before '<' token
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^
p949.cpp:137:14: error: 'ranges' has not been declared
137 | template<ranges::input_range R>
| ^~~~~~
p949.cpp:137:34: error: expected '>' before 'R'
137 | template<ranges::input_range R>
| ^
p949.cpp:138:12: error: expected constructor, destructor, or type conversion before '(' token
138 | queue(from_range_t, R&&) -> queue<ranges::range_value_t<R>>;
| ^
p949.cpp:140:38: error: 'queue' does not name a type
140 | queue(Container, Allocator) -> queue<typename Container::value_type, Container>;
| ^~~~~
p949.cpp:140:43: error: expected constructor, destructor, or type conversion before '<' token
140 | queue(Container, Allocator) -> queue<typename Container::value_type, Container>;
| ^
p949.cpp:143:4: error: 'queue' does not name a type
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~
p949.cpp:143:9: error: expected constructor, destructor, or type conversion before '<' token
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^
p949.cpp:144:14: error: 'ranges' has not been declared
144 | template<ranges::input_range R, class Allocator>
| ^~~~~~
p949.cpp:144:34: error: expected '>' before 'R'
144 | template<ranges::input_range R, class Allocator>
| ^
p949.cpp:145:12: error: expected constructor, destructor, or type conversion before '(' token
145 | queue(from_range_t, R&&, Allocator)
| ^
p949.cpp:148:14: error: 'uses_allocator' is not a class template
148 | struct uses_allocator<queue<T, Container>, Alloc>
| ^~~~~~~~~~~~~~
p949.cpp:148:29: error: 'queue' was not declared in this scope
148 | struct uses_allocator<queue<T, Container>, Alloc>
| ^~~~~
p949.cpp:148:29: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
p949.cpp:148:28: error: expected ';' before ',' token
148 | struct uses_allocator<queue<T, Container>, Alloc>
| ^ ~
| ;
p949.cpp:152:22: error: 'Container' does not name a type
152 | explicit queue(const Container& cont);
| ^~~~~~~~~
p949.cpp:152:10: error: ISO C++ forbids declaration of 'queue' with no type [-fpermissive]
152 | explicit queue(const Container& cont);
| ^~~~~
p949.cpp:152:1: error: 'explicit' outside class declaration
152 | explicit queue(const Container& cont);
| ^~~~~~~~
p949.cpp:154:10: error: ISO C++ forbids declaration of 'queue' with no type [-fpermissive]
154 | explicit queue(Container&& cont);
| ^~~~~
p949.cpp:154:1: error: 'explicit' outside class declaration
154 | explicit queue(Container&& cont);
| ^~~~~~~~
p949.cpp:154:16: error: 'int queue' redeclared as different kind of entity
154 | explicit queue(Container&& cont);
| ^~~~~~~~~
p949.cpp:152:10: note: previous declaration 'int queue(const int&)'
152 | explicit queue(const Container& cont);
| ^~~~~
p949.cpp:154:16: error: 'Container' was not declared in this scope
154 | explicit queue(Container&& cont);
| ^~~~~~~~~
p949.cpp:154:28: error: 'cont' was not declared in this scope; did you mean 'const'?
154 | explicit queue(Container&& cont);
| ^~~~
| const
p949.cpp:157:49: error: expected constructor, destructor, or type conversion before ';' token
157 | queue(InputIterator first, InputIterator last);
| ^
p949.cpp:159:35: error: ISO C++ forbids declaration of 'queue' with no type [-fpermissive]
159 | template<class Alloc> explicit queue(const Alloc& a);
| ^~~~~
p949.cpp:159:26: error: 'explicit' outside class declaration
159 | template<class Alloc> explicit queue(const Alloc& a);
| ^~~~~~~~
p949.cpp:161:35: error: 'container_type' does not name a type
161 | template<class Alloc> queue(const container_type& cont, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:161:72: error: expected constructor, destructor, or type conversion before ';' token
161 | template<class Alloc> queue(const container_type& cont, const Alloc& a);
| ^
p949.cpp:163:28: error: expected constructor, destructor, or type conversion before '(' token
163 | template<class Alloc> queue(container_type&& cont, const Alloc& a);
| ^
p949.cpp:165:35: error: 'queue' does not name a type
165 | template<class Alloc> queue(const queue& q, const Alloc& a);
| ^~~~~
p949.cpp:165:60: error: expected constructor, destructor, or type conversion before ';' token
165 | template<class Alloc> queue(const queue& q, const Alloc& a);
| ^
p949.cpp:168:10: error: 'container_compatible_range' has not been declared
168 | template<container_compatible_range<T> R>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:168:36: error: expected '>' before '<' token
168 | template<container_compatible_range<T> R>
| ^
p949.cpp:169:8: error: expected constructor, destructor, or type conversion before '(' token
169 | queue(from_range_t, R&& rg);
| ^
p949.cpp:172:28: error: expected constructor, destructor, or type conversion before '(' token
172 | template<class Alloc> queue(queue&& q, const Alloc& a);
| ^
p949.cpp:174:6: error: expected constructor, destructor, or type conversion before '(' token
174 | queue(InputIterator first, InputIterator last, const Alloc& alloc);
| ^
p949.cpp:176:10: error: 'container_compatible_range' has not been declared
176 | template<container_compatible_range<T> R, class Alloc> queue(from_range_t, R&& rg, const Alloc& a);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:176:36: error: expected '>' before '<' token
176 | template<container_compatible_range<T> R, class Alloc> queue(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:176:61: error: expected constructor, destructor, or type conversion before '(' token
176 | template<container_compatible_range<T> R, class Alloc> queue(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:179:10: error: 'container_compatible_range' has not been declared
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:179:36: error: expected '>' before '<' token
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^
p949.cpp:179:48: error: variable or field 'push_range' declared void
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^~~~~~~~~~
p949.cpp:179:59: error: 'R' was not declared in this scope
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^
p949.cpp:179:63: error: 'rg' was not declared in this scope
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^~
p949.cpp:183:25: error: 'queue<T, Container>' does not name a type
183 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:183:55: error: 'queue<T, Container>' does not name a type
183 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:183:8: error: 'bool operator==(const int&, const int&)' must have an argument of class or enumerated type
183 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:185:31: error: 'T' was not declared in this scope
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:185:34: error: 'Container' was not declared in this scope
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:185:25: error: 'queue<<expression error>, <expression error> >' does not name a type
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:185:62: error: 'T' was not declared in this scope
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:185:65: error: 'Container' was not declared in this scope
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:185:56: error: 'queue<<expression error>, <expression error> >' does not name a type
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:185:8: error: 'bool operator!=(const int&, const int&)' must have an argument of class or enumerated type
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:187:31: error: 'T' was not declared in this scope
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:187:34: error: 'Container' was not declared in this scope
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:187:25: error: 'queue<<expression error>, <expression error> >' does not name a type
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:187:61: error: 'T' was not declared in this scope
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:187:64: error: 'Container' was not declared in this scope
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:187:55: error: 'queue<<expression error>, <expression error> >' does not name a type
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:187:8: error: 'bool operator<(const int&, const int&)' must have an argument of class or enumerated type
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:189:31: error: 'T' was not declared in this scope
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:189:34: error: 'Container' was not declared in this scope
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:189:25: error: 'queue<<expression error>, <expression error> >' does not name a type
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:189:61: error: 'T' was not declared in this scope
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:189:64: error: 'Container' was not declared in this scope
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:189:55: error: 'queue<<expression error>, <expression error> >' does not name a type
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:189:8: error: 'bool operator>(const int&, const int&)' must have an argument of class or enumerated type
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:191:29: error: 'T' was not declared in this scope
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:191:32: error: 'Container' was not declared in this scope
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:191:23: error: 'queue<<expression error>, <expression error> >' does not name a type
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:191:59: error: 'T' was not declared in this scope
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:191:62: error: 'Container' was not declared in this scope
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:191:53: error: 'queue<<expression error>, <expression error> >' does not name a type
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:191:6: error: 'bool operator<=(const int&, const int&)' must have an argument of class or enumerated type
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:194:27: error: 'queue<T, Container>' does not name a type
194 | bool operator>=(const queue<T, Container>& x,
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:195:22: error: 'queue<T, Container>' does not name a type
195 | const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:194:10: error: 'bool operator>=(const int&, const int&)' must have an argument of class or enumerated type
194 | bool operator>=(const queue<T, Container>& x,
| ^~~~~~~~
p949.cpp:197:19: error: 'three_way_comparable' has not been declared
197 | template<class T, three_way_comparable Container>
| ^~~~~~~~~~~~~~~~~~~~
p949.cpp:198:3: error: 'compare_three_way_result_t' does not name a type
198 | compare_three_way_result_t<Container>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:203:8: error: variable or field 'swap' declared void
203 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~
p949.cpp:203:34: error: 'x' was not declared in this scope
203 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:203:58: error: 'y' was not declared in this scope
203 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:210:68: error: spurious '>>', use '>' to terminate a template argument list
210 | class Compare = less<typename Container::value_type>>
| ^~
p949.cpp:211:29: error: definition of 'class std::priority_queue' inside template parameter list
211 | class priority_queue {
| ^
p949.cpp:210:33: error: two or more data types in declaration of 'type name'
210 | class Compare = less<typename Container::value_type>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:266:2: error: expected '>' before ';' token
266 | };
| ^
p949.cpp:266:2: error: expected unqualified-id before ';' token
p949.cpp:268:29: error: expected ')' before ',' token
268 | priority_queue(Compare, Container)
| ~ ^
| )
p949.cpp:271:22: error: 'iter_value_type' was not declared in this scope
271 | class Compare = less<iter_value_type<InputIterator>>, class Container = vector<iter_value_type<InputIterator>>>
| ^~~~~~~~~~~~~~~
p949.cpp:272:160: error: wrong number of template arguments (2, should be 1)
272 | (), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^
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>
| ^~~~
p949.cpp:272:161: error: expected '>' before ';' token
272 | (), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^
p949.cpp:272:161: error: expected unqualified-id before ';' token
p949.cpp:273:14: error: 'ranges' has not been declared
273 | template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>
| ^~~~~~
p949.cpp:273:34: error: expected '>' before 'R'
273 | template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>
| ^
p949.cpp:275:95: error: expected unqualified-id before ';' token
275 | -> priority_queue<ranges::range_value_t<R>, vector<ranges::range_value_t<R>>, Compare>;
| ^
p949.cpp:277:29: error: expected ')' before ',' token
277 | priority_queue(Compare, Container, Allocator)
| ~ ^
| )
p949.cpp:280:35: error: expected ')' before ',' token
280 | priority_queue(InputIterator, InputIterator, Allocator)
| ~ ^
| )
p949.cpp:284:35: error: expected ')' before ',' token
284 | priority_queue(InputIterator, InputIterator, Compare, Allocator)
| ~ ^
| )
p949.cpp:287:35: error: expected ')' before ',' token
287 | priority_queue(InputIterator, InputIterator, Compare, Container, Allocator)
| ~ ^
| )
p949.cpp:289:14: error: 'ranges' has not been declared
289 | template<ranges::input_range R, class Compare, class Allocator>
| ^~~~~~
p949.cpp:289:34: error: expected '>' before 'R'
289 | template<ranges::input_range R, class Compare, class Allocator>
| ^
p949.cpp:290:34: error: expected ')' before ',' token
290 | priority_queue(from_range_t, R&&, Compare, Allocator)
| ~ ^
| )
p949.cpp:293:14: error: 'ranges' has not been declared
293 | template<ranges::input_range R, class Allocator>
| ^~~~~~
p949.cpp:293:34: error: expected '>' before 'R'
293 | template<ranges::input_range R, class Allocator>
| ^
p949.cpp:294:34: error: expected ')' before ',' token
294 | priority_queue(from_range_t, R&&, Allocator)
| ~ ^
| )
p949.cpp:298:14: error: 'uses_allocator' is not a class template
298 | struct uses_allocator<priority_queue<T, Container, Compare>, Alloc>
| ^~~~~~~~~~~~~~
p949.cpp:298:29: error: 'std::priority_queue' is not a template
298 | struct uses_allocator<priority_queue<T, Container, Compare>, Alloc>
| ^~~~~~~~~~~~~~
p949.cpp:298:73: error: 'std::uses_allocator' is not a template
298 | struct uses_allocator<priority_queue<T, Container, Compare>, Alloc>
| ^
p949.cpp:56:14: note: previous declaration here
56 | struct uses_allocator<queue<T, Container>, Alloc>;
| ^~~~~~~~~~~~~~
p949.cpp:299:25: error: expected template-name before '<' token
299 | : uses_allocator<Container, Alloc>::type { };
| ^
p949.cpp:302:16: error: expected unqualified-id before 'const'
302 | priority_queue(const Compare& x, const Container& y);
| ^~~~~
p949.cpp:302:16: error: expected ')' before 'const'
302 | priority_queue(const Compare& x, const Container& y);
| ~^~~~~
| )
p949.cpp:303:16: error: expected unqualified-id before 'const'
303 | priority_queue(const Compare& x, Container&& y);
| ^~~~~
p949.cpp:303:16: error: expected ')' before 'const'
303 | priority_queue(const Compare& x, Container&& y);
| ~^~~~~
| )
p949.cpp:305:16: error: expected unqualified-id before 'const'
305 | priority_queue(const Compare& compare, const Container& cont, const Alloc& a);
| ^~~~~
p949.cpp:305:16: error: expected ')' before 'const'
305 | priority_queue(const Compare& compare, const Container& cont, const Alloc& a);
| ~^~~~~
| )
p949.cpp:309:50: error: expected unqualified-id before 'const'
309 | template<class Alloc> explicit priority_queue(const Alloc& a);
| ^~~~~
p949.cpp:309:50: error: expected ')' before 'const'
309 | template<class Alloc> explicit priority_queue(const Alloc& a);
| ~^~~~~
| )
p949.cpp:311:38: error: expected unqualified-id before 'const'
311 | template<class Alloc> priority_queue(const Compare& compare, const Alloc& a);
| ^~~~~
p949.cpp:311:38: error: expected ')' before 'const'
311 | template<class Alloc> priority_queue(const Compare& compare, const Alloc& a);
| ~^~~~~
| )
p949.cpp:314:31: error: expected ')' before 'first'
314 | priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare());
| ~ ^~~~~~
| )
p949.cpp:317:1: error: 'comp' does not name a type
317 | comp with x; then calls make_heap(c.begin(), c.end(), comp).
| ^~~~
p949.cpp:317:14: error: 'then' does not name a type
317 | comp with x; then calls make_heap(c.begin(), c.end(), comp).
| ^~~~
p949.cpp:321:31: error: expected ')' before 'first'
321 | priority_queue(InputIterator first, InputIterator last, const Compare& x, Container&& y);
| ~ ^~~~~~
| )
p949.cpp:324:1: error: 'calls' does not name a type
324 | calls c.insert(c.end(), first, last); and finally calls make_heap(c.begin(), c.end(), comp). template<container-compatible-range<T> R>
| ^~~~~
p949.cpp:324:39: error: expected unqualified-id before 'and' token
324 | calls c.insert(c.end(), first, last); and finally calls make_heap(c.begin(), c.end(), comp). template<container-compatible-range<T> R>
| ^~~
p949.cpp:328:1: error: 'finally' does not name a type
328 | finally calls make_heap(c.begin(), c.end(), comp).
| ^~~~~~~
p949.cpp:333:38: error: expected unqualified-id before 'const'
333 | template<class Alloc> priority_queue(const priority_queue& q, const Alloc& a);
| ^~~~~
p949.cpp:333:38: error: expected ')' before 'const'
333 | template<class Alloc> priority_queue(const priority_queue& q, const Alloc& a);
| ~^~~~~
| )
p949.cpp:335:52: error: expected ')' before '&&' token
335 | template<class Alloc> priority_queue(priority_queue&& q, const Alloc& a);
| ~ ^~
| )
p949.cpp:338:31: error: expected ')' before 'first'
338 | priority_queue(InputIterator first, InputIterator last, const Alloc& a);
| ~ ^~~~~~
| )
p949.cpp:341:31: error: expected ')' before 'first'
341 | priority_queue(InputIterator first, InputIterator last, const Compare& compare, const Alloc& a);
| ~ ^~~~~~
| )
p949.cpp:344:31: error: expected ')' before 'first'
344 | priority_queue(InputIterator first, InputIterator last, const Compare& compare,
| ~ ^~~~~~
| )
p949.cpp:348:31: error: expected ')' before 'first'
348 | priority_queue(InputIterator first, InputIterator last, const Compare& compare, Container&& cont,
| ~ ^~~~~~
| )
p949.cpp:351:10: error: 'container' has not been declared
351 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Compare& compare, const Alloc& a);
| ^~~~~~~~~
p949.cpp:351:19: error: expected '>' before '-' token
351 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Compare& compare, const Alloc& a);
| ^
p949.cpp:351:83: error: expected ')' before ',' token
351 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Compare& compare, const Alloc& a);
| ~ ^
| )
p949.cpp:353:10: error: 'container' has not been declared
353 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Alloc& a);
| ^~~~~~~~~
p949.cpp:353:19: error: expected '>' before '-' token
353 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:353:83: error: expected ')' before ',' token
353 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Alloc& a);
| ~ ^
| )
p949.cpp:356:17: error: 'value_type' does not name a type
356 | void push(const value_type& x);
| ^~~~~~~~~~
p949.cpp:358:12: error: expected constructor, destructor, or type conversion before '(' token
358 | push_heap(c.begin(), c.end(), comp);
| ^
p949.cpp:359:6: error: variable or field 'push' declared void
359 | void push(value_type&& x);
| ^~~~
p949.cpp:359:11: error: 'value_type' was not declared in this scope
359 | void push(value_type&& x);
| ^~~~~~~~~~
p949.cpp:359:24: error: 'x' was not declared in this scope
359 | void push(value_type&& x);
| ^
p949.cpp:361:12: error: expected constructor, destructor, or type conversion before '(' token
361 | push_heap(c.begin(), c.end(), comp);
| ^
p949.cpp:362:10: error: 'container' has not been declared
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~~~~~~~~
p949.cpp:362:19: error: expected '>' before '-' token
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^
p949.cpp:362:48: error: variable or field 'push_range' declared void
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~~~~~~~~~
p949.cpp:362:59: error: 'R' was not declared in this scope
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^
p949.cpp:362:63: error: 'rg' was not declared in this scope
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~
p949.cpp:365:15: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
365 | template<class... Args> void emplace(Args&&... args);
| ^~~
p949.cpp:365:42: error: expected ',' or '...' before '&&' token
365 | template<class... Args> void emplace(Args&&... args);
| ^~
p949.cpp:365:52: error: parameter packs not expanded with '...':
365 | template<class... Args> void emplace(Args&&... args);
| ^
p949.cpp:365:52: note: 'Args'
p949.cpp:367:12: error: expected constructor, destructor, or type conversion before '(' token
367 | push_heap(c.begin(), c.end(), comp);
| ^
p949.cpp:370:9: error: expected constructor, destructor, or type conversion before '(' token
370 | pop_heap(c.begin(), c.end(), comp);
| ^
p949.cpp:371:3: error: 'c' does not name a type
371 | c.pop_back();
| ^
p949.cpp:374:13: error: 'std::priority_queue' is not a template
374 | void swap(priority_queue<T, Container, Compare>& x,
| ^~~~~~~~~~~~~~
p949.cpp:375:13: error: 'std::priority_queue' is not a template
375 | priority_queue<T, Container, Compare>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~~~~~~~~~~
p949.cpp:375:55: error: expected initializer before 'noexcept'
375 | priority_queue<T, Container, Compare>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~~~~
p949.cpp:380:44: error: 'deque' does not name a type
380 | template<class T, class Container = deque<T>>
| ^~~~~
p949.cpp:380:49: error: expected '>' before '<' token
380 | template<class T, class Container = deque<T>>
| ^
p949.cpp:381:20: error: expected unqualified-id before '{' token
381 | class stack {
| ^
p949.cpp:411:30: error: 'stack' does not name a type; did you mean 'obstack'?
411 | stack(Container) -> stack<typename Container::value_type, Container>;
| ^~~~~
| obstack
p949.cpp:411:35: error: expected constructor, destructor, or type conversion before '<' token
411 | stack(Container) -> stack<typename Container::value_type, Container>;
| ^
p949.cpp:414:1: error: expected unqualified-id before '[' token
414 | [[nodiscard]] bool empty() const size_type size() const
| ^
p949.cpp:418:1: error: expected unqualified-id before '{' token
418 | { return c.size(); }
| ^
p949.cpp:419:1: error: expected unqualified-id before '{' token
419 | { return c.back(); }
| ^
p949.cpp:420:1: error: expected unqualified-id before '{' token
420 | { return c.back(); }
| ^
p949.cpp:421:1: error: expected unqualified-id before '{' token
421 | { c.push_back(x); }
| ^
p949.cpp:422:1: error: expected unqualified-id before '{' token
422 | { c.push_back(std::move(x)); }
| ^
p949.cpp:425:40: error: 'stack' does not name a type; did you mean 'obstack'?
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^~~~~
| obstack
p949.cpp:425:45: error: expected constructor, destructor, or type conversion before '<' token
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^
p949.cpp:426:14: error: 'ranges' has not been declared
426 | template<ranges::input_range R>
| ^~~~~~
p949.cpp:426:34: error: expected '>' before 'R'
426 | template<ranges::input_range R>
| ^
p949.cpp:427:12: error: expected constructor, destructor, or type conversion before '(' token
427 | stack(from_range_t, R&&) -> stack<ranges::range_value_t<R>>;
| ^
p949.cpp:429:38: error: 'stack' does not name a type; did you mean 'obstack'?
429 | stack(Container, Allocator) -> stack<typename Container::value_type, Container>;
| ^~~~~
| obstack
p949.cpp:429:43: error: expected constructor, destructor, or type conversion before '<' token
429 | stack(Container, Allocator) -> stack<typename Container::value_type, Container>;
| ^
p949.cpp:432:4: error: 'stack' does not name a type; did you mean 'obstack'?
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~
| obstack
p949.cpp:432:9: error: expected constructor, destructor, or type conversion before '<' token
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^
p949.cpp:433:14: error: 'ranges' has not been declared
433 | template<ranges::input_range R, class Allocator>
| ^~~~~~
p949.cpp:433:34: error: expected '>' before 'R'
433 | template<ranges::input_range R, class Allocator>
| ^
p949.cpp:434:12: error: expected constructor, destructor, or type conversion before '(' token
434 | stack(from_range_t, R&&, Allocator)
| ^
p949.cpp:437:14: error: 'uses_allocator' is not a class template
437 | struct uses_allocator<stack<T, Container>, Alloc>
| ^~~~~~~~~~~~~~
p949.cpp:437:29: error: 'stack' was not declared in this scope
437 | struct uses_allocator<stack<T, Container>, Alloc>
| ^~~~~
p949.cpp:437:29: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
p949.cpp:437:28: error: expected ';' before ',' token
437 | struct uses_allocator<stack<T, Container>, Alloc>
| ^ ~
| ;
p949.cpp:441:10: error: ISO C++ forbids declaration of 'stack' with no type [-fpermissive]
441 | explicit stack(const Container& cont);
| ^~~~~
p949.cpp:441:1: error: 'explicit' outside class declaration
441 | explicit stack(const Container& cont);
| ^~~~~~~~
p949.cpp:444:8: error: expected constructor, destructor, or type conversion before '(' token
444 | stack(InputIterator first, InputIterator last);
| ^
p949.cpp:446:35: error: ISO C++ forbids declaration of 'stack' with no type [-fpermissive]
446 | template<class Alloc> explicit stack(const Alloc& a);
| ^~~~~
p949.cpp:446:26: error: 'explicit' outside class declaration
446 | template<class Alloc> explicit stack(const Alloc& a);
| ^~~~~~~~
p949.cpp:448:35: error: 'container_type' does not name a type
448 | template<class Alloc> stack(const container_type& cont, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:448:72: error: expected constructor, destructor, or type conversion before ';' token
448 | template<class Alloc> stack(const container_type& cont, const Alloc& a);
| ^
p949.cpp:453:8: error: expected constructor, destructor, or type conversion before '(' token
453 | stack(from_range_t, R&& rg);
| ^
p949.cpp:457:72: error: expected constructor, destructor, or type conversion before ';' token
457 | stack(InputIterator first, InputIterator last, const Alloc& alloc);
| ^
p949.cpp:459:10: error: 'container' has not been declared
459 | template<container-compatible-range<T> R, class Alloc> stack(from_range_t, R&& rg, const Alloc& a);
| ^~~~~~~~~
p949.cpp:459:19: error: expected '>' before '-' token
459 | template<container-compatible-range<T> R, class Alloc> stack(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:459:61: error: expected constructor, destructor, or type conversion before '(' token
459 | template<container-compatible-range<T> R, class Alloc> stack(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:462:10: error: 'container' has not been declared
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~~~~~~~~
p949.cpp:462:19: error: expected '>' before '-' token
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^
p949.cpp:462:48: error: variable or field 'push_range' declared void
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~~~~~~~~~
p949.cpp:462:59: error: 'R' was not declared in this scope
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^
p949.cpp:462:63: error: 'rg' was not declared in this scope
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~
p949.cpp:466:25: error: 'stack<T, Container>' does not name a type
466 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:466:55: error: 'stack<T, Container>' does not name a type
466 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:466:8: error: 'bool operator==(const int&, const int&)' must have an argument of class or enumerated type
466 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:468:31: error: 'T' was not declared in this scope
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:468:25: error: 'stack<<expression error>, std::Container>' does not name a type
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:468:61: error: 'T' was not declared in this scope
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:468:55: error: 'stack<<expression error>, std::Container>' does not name a type
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:468:8: error: 'bool operator!=(const int&, const int&)' must have an argument of class or enumerated type
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:470:31: error: 'T' was not declared in this scope
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:470:25: error: 'stack<<expression error>, std::Container>' does not name a type
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:470:61: error: 'T' was not declared in this scope
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:470:55: error: 'stack<<expression error>, std::Container>' does not name a type
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:470:8: error: 'bool operator<(const int&, const int&)' must have an argument of class or enumerated type
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:472:31: error: 'T' was not declared in this scope
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:472:25: error: 'stack<<expression error>, std::Container>' does not name a type
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:472:61: error: 'T' was not declared in this scope
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:472:55: error: 'stack<<expression error>, std::Container>' does not name a type
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:472:8: error: 'bool operator>(const int&, const int&)' must have an argument of class or enumerated type
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:474:31: error: 'T' was not declared in this scope
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:474:25: error: 'stack<<expression error>, std::Container>' does not name a type
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:474:61: error: 'T' was not declared in this scope
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:474:55: error: 'stack<<expression error>, std::Container>' does not name a type
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:474:8: error: 'bool operator<=(const int&, const int&)' must have an argument of class or enumerated type
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:476:29: error: 'T' was not declared in this scope
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:476:23: error: 'stack<<expression error>, std::Container>' does not name a type
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:476:59: error: 'T' was not declared in this scope
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:476:53: error: 'stack<<expression error>, std::Container>' does not name a type
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:476:6: error: 'bool operator>=(const int&, const int&)' must have an argument of class or enumerated type
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:478:19: error: 'three_way_comparable' has not been declared
478 | template<class T, three_way_comparable Container>
| ^~~~~~~~~~~~~~~~~~~~
p949.cpp:479:3: error: 'compare_three_way_result_t' does not name a type
479 | compare_three_way_result_t<Container>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:484:8: error: variable or field 'swap' declared void
484 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~
p949.cpp:484:34: error: 'x' was not declared in this scope
484 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:484:58: error: 'y' was not declared in this scope
484 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
$ g++ p949.cpp -std=2b -o p949g -I. -Wall
p949.cpp:15:29: error: 'K' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:32: error: 'H' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:35: error: 'P' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:38: error: 'A' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:29: error: 'K' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:32: error: 'H' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:35: error: 'P' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:38: error: 'A' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:29: error: 'K' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:32: error: 'H' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:35: error: 'P' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:38: error: 'A' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:29: error: 'K' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:32: error: 'H' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:35: error: 'P' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:38: error: 'A' was not declared in this scope
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:15:9: error: expected constructor, destructor, or type conversion before '(' token
15 | erase_if(unordered_multiset<K, H, P, A>& c, Predicate pred);
| ^
p949.cpp:17:25: error: 'c' was not declared in this scope
17 | auto original_size = c.size();
| ^
p949.cpp:18:4: error: expected unqualified-id before 'for'
18 | for (auto i = c.begin(), last = c.end(); i != last; ) {
| ^~~
p949.cpp:18:45: error: 'i' does not name a type
18 | for (auto i = c.begin(), last = c.end(); i != last; ) {
| ^
p949.cpp:18:56: error: expected unqualified-id before ')' token
18 | for (auto i = c.begin(), last = c.end(); i != last; ) {
| ^
p949.cpp:23:4: error: expected unqualified-id before 'return'
23 | return original_size - c.size();
| ^~~~~~
p949.cpp:37:41: error: 'deque' does not name a type
37 | template<class T, class Container = deque<T>> class queue;
| ^~~~~
p949.cpp:37:46: error: expected '>' before '<' token
37 | template<class T, class Container = deque<T>> class queue;
| ^
p949.cpp:37:62: error: expected unqualified-id before ';' token
37 | template<class T, class Container = deque<T>> class queue;
| ^
p949.cpp:39:29: error: 'queue' does not name a type
39 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:39:34: error: expected ',' or '...' before '<' token
39 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:39:12: error: 'bool std::operator==(int)' must have an argument of class or enumerated type
39 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:41:29: error: 'queue' does not name a type
41 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:41:34: error: expected ',' or '...' before '<' token
41 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:41:12: error: 'bool std::operator!=(int)' must have an argument of class or enumerated type
41 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:43:29: error: 'queue' does not name a type
43 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:43:34: error: expected ',' or '...' before '<' token
43 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:43:12: error: 'bool std::operator<(int)' must have an argument of class or enumerated type
43 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:45:29: error: 'queue' does not name a type
45 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:45:34: error: expected ',' or '...' before '<' token
45 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:45:12: error: 'bool std::operator>(int)' must have an argument of class or enumerated type
45 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:47:29: error: 'queue' does not name a type
47 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:47:34: error: expected ',' or '...' before '<' token
47 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:47:12: error: 'bool std::operator<=(int)' must have an argument of class or enumerated type
47 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:49:29: error: 'queue' does not name a type
49 | bool operator>=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:49:34: error: expected ',' or '...' before '<' token
49 | bool operator>=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:49:12: error: 'bool std::operator>=(int)' must have an argument of class or enumerated type
49 | bool operator>=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:52:27: error: 'queue' does not name a type
52 | operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~
p949.cpp:52:32: error: expected ',' or '...' before '<' token
52 | operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:52:9: error: 'std::compare_three_way_result_t<Container> std::operator<=>(int)' must have an argument of class or enumerated type
52 | operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:54:12: error: variable or field 'swap' declared void
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~
p949.cpp:54:17: error: 'queue' was not declared in this scope
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~
p949.cpp:11:1: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
10 | #include "N4910.h"
+++ |+#include <queue>
11 |
p949.cpp:54:24: error: expected primary-expression before ',' token
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:35: error: expected primary-expression before '>' token
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:38: error: 'x' was not declared in this scope
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:41: error: 'queue' was not declared in this scope
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~
p949.cpp:54:41: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
p949.cpp:54:48: error: expected primary-expression before ',' token
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:59: error: expected primary-expression before '>' token
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:54:62: error: 'y' was not declared in this scope
54 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:56:29: error: 'queue' was not declared in this scope
56 | struct uses_allocator<queue<T, Container>, Alloc>;
| ^~~~~
p949.cpp:56:29: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
p949.cpp:56:47: error: template argument 1 is invalid
56 | struct uses_allocator<queue<T, Container>, Alloc>;
| ^
p949.cpp:70:41: error: 'deque' does not name a type
70 | template<class T, class Container = deque<T>> class stack;
| ^~~~~
p949.cpp:70:46: error: expected '>' before '<' token
70 | template<class T, class Container = deque<T>> class stack;
| ^
p949.cpp:70:62: error: expected unqualified-id before ';' token
70 | template<class T, class Container = deque<T>> class stack;
| ^
p949.cpp:72:29: error: 'stack' does not name a type; did you mean 'obstack'?
72 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:72:34: error: expected ',' or '...' before '<' token
72 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:72:12: error: 'bool std::operator==(int)' must have an argument of class or enumerated type
72 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:74:29: error: 'stack' does not name a type; did you mean 'obstack'?
74 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:74:34: error: expected ',' or '...' before '<' token
74 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:74:12: error: 'bool std::operator!=(int)' must have an argument of class or enumerated type
74 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:76:29: error: 'stack' does not name a type; did you mean 'obstack'?
76 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:76:34: error: expected ',' or '...' before '<' token
76 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:76:12: error: 'bool std::operator<(int)' must have an argument of class or enumerated type
76 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:78:32: error: 'stack' does not name a type; did you mean 'obstack'?
78 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:78:37: error: expected ',' or '...' before '<' token
78 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:78:15: error: 'bool std::operator>(int)' must have an argument of class or enumerated type
78 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:80:32: error: 'stack' does not name a type; did you mean 'obstack'?
80 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:80:37: error: expected ',' or '...' before '<' token
80 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:80:15: error: 'bool std::operator<=(int)' must have an argument of class or enumerated type
80 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:82:32: error: 'stack' does not name a type; did you mean 'obstack'?
82 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:82:37: error: expected ',' or '...' before '<' token
82 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:82:15: error: 'bool std::operator>=(int)' must have an argument of class or enumerated type
82 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:85:30: error: 'stack' does not name a type; did you mean 'obstack'?
85 | operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~
| obstack
p949.cpp:85:35: error: expected ',' or '...' before '<' token
85 | operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:85:12: error: 'std::compare_three_way_result_t<Container> std::operator<=>(int)' must have an argument of class or enumerated type
85 | operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:87:15: error: variable or field 'swap' declared void
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~
p949.cpp:87:20: error: 'stack' was not declared in this scope
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~
p949.cpp:11:1: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
10 | #include "N4910.h"
+++ |+#include <stack>
11 |
p949.cpp:87:27: error: expected primary-expression before ',' token
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:38: error: expected primary-expression before '>' token
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:41: error: 'x' was not declared in this scope
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:44: error: 'stack' was not declared in this scope
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~~
p949.cpp:87:44: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
p949.cpp:87:51: error: expected primary-expression before ',' token
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:62: error: expected primary-expression before '>' token
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:87:65: error: 'y' was not declared in this scope
87 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:89:32: error: 'stack' was not declared in this scope
89 | struct uses_allocator<stack<T, Container>, Alloc>;
| ^~~~~
p949.cpp:89:32: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
p949.cpp:89:50: error: template argument 1 is invalid
89 | struct uses_allocator<stack<T, Container>, Alloc>;
| ^
p949.cpp:95:44: error: 'deque' does not name a type
95 | template<class T, class Container = deque<T>>
| ^~~~~
p949.cpp:95:49: error: expected '>' before '<' token
95 | template<class T, class Container = deque<T>>
| ^
p949.cpp:96:20: error: expected unqualified-id before '{' token
96 | class queue {
| ^
p949.cpp:134:27: error: 'queue' does not name a type
134 | queue(Container) -> queue<typename Container::value_type, Container>;
| ^~~~~
p949.cpp:134:32: error: expected constructor, destructor, or type conversion before '<' token
134 | queue(Container) -> queue<typename Container::value_type, Container>;
| ^
p949.cpp:136:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:136:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:136:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:136:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:136:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:136:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:136:40: error: 'queue' does not name a type
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^~~~~
p949.cpp:136:45: error: expected constructor, destructor, or type conversion before '<' token
136 | queue(InputIterator, InputIterator) -> queue<iter_value_type<InputIterator>>;
| ^
p949.cpp:138:12: error: expected constructor, destructor, or type conversion before '(' token
138 | queue(from_range_t, R&&) -> queue<ranges::range_value_t<R>>;
| ^
p949.cpp:140:38: error: 'queue' does not name a type
140 | queue(Container, Allocator) -> queue<typename Container::value_type, Container>;
| ^~~~~
p949.cpp:140:43: error: expected constructor, destructor, or type conversion before '<' token
140 | queue(Container, Allocator) -> queue<typename Container::value_type, Container>;
| ^
p949.cpp:143:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:143:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:143:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:143:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:143:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:143:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:143:4: error: 'queue' does not name a type
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~
p949.cpp:143:9: error: expected constructor, destructor, or type conversion before '<' token
143 | -> queue<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^
p949.cpp:145:12: error: expected constructor, destructor, or type conversion before '(' token
145 | queue(from_range_t, R&&, Allocator)
| ^
p949.cpp:148:29: error: 'queue' was not declared in this scope
148 | struct uses_allocator<queue<T, Container>, Alloc>
| ^~~~~
p949.cpp:148:29: note: 'std::queue' is defined in header '<queue>'; did you forget to '#include <queue>'?
p949.cpp:148:47: error: template argument 1 is invalid
148 | struct uses_allocator<queue<T, Container>, Alloc>
| ^
p949.cpp:152:22: error: 'Container' does not name a type
152 | explicit queue(const Container& cont);
| ^~~~~~~~~
p949.cpp:152:10: error: ISO C++ forbids declaration of 'queue' with no type [-fpermissive]
152 | explicit queue(const Container& cont);
| ^~~~~
p949.cpp:152:1: error: 'explicit' outside class declaration
152 | explicit queue(const Container& cont);
| ^~~~~~~~
p949.cpp:154:10: error: ISO C++ forbids declaration of 'queue' with no type [-fpermissive]
154 | explicit queue(Container&& cont);
| ^~~~~
p949.cpp:154:1: error: 'explicit' outside class declaration
154 | explicit queue(Container&& cont);
| ^~~~~~~~
p949.cpp:154:16: error: 'int queue' redeclared as different kind of entity
154 | explicit queue(Container&& cont);
| ^~~~~~~~~
p949.cpp:152:10: note: previous declaration 'int queue(const int&)'
152 | explicit queue(const Container& cont);
| ^~~~~
p949.cpp:154:16: error: 'Container' was not declared in this scope
154 | explicit queue(Container&& cont);
| ^~~~~~~~~
p949.cpp:154:28: error: 'cont' was not declared in this scope; did you mean 'const'?
154 | explicit queue(Container&& cont);
| ^~~~
| const
p949.cpp:157:49: error: expected constructor, destructor, or type conversion before ';' token
157 | queue(InputIterator first, InputIterator last);
| ^
p949.cpp:159:35: error: ISO C++ forbids declaration of 'queue' with no type [-fpermissive]
159 | template<class Alloc> explicit queue(const Alloc& a);
| ^~~~~
p949.cpp:159:26: error: 'explicit' outside class declaration
159 | template<class Alloc> explicit queue(const Alloc& a);
| ^~~~~~~~
p949.cpp:161:35: error: 'container_type' does not name a type
161 | template<class Alloc> queue(const container_type& cont, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:161:72: error: expected constructor, destructor, or type conversion before ';' token
161 | template<class Alloc> queue(const container_type& cont, const Alloc& a);
| ^
p949.cpp:163:28: error: expected constructor, destructor, or type conversion before '(' token
163 | template<class Alloc> queue(container_type&& cont, const Alloc& a);
| ^
p949.cpp:165:35: error: 'queue' does not name a type
165 | template<class Alloc> queue(const queue& q, const Alloc& a);
| ^~~~~
p949.cpp:165:60: error: expected constructor, destructor, or type conversion before ';' token
165 | template<class Alloc> queue(const queue& q, const Alloc& a);
| ^
p949.cpp:168:37: error: 'T' was not declared in this scope
168 | template<container_compatible_range<T> R>
| ^
p949.cpp:168:37: error: 'T' was not declared in this scope
p949.cpp:168:37: error: 'T' was not declared in this scope
p949.cpp:168:37: error: 'T' was not declared in this scope
p949.cpp:168:37: error: 'T' was not declared in this scope
p949.cpp:168:37: error: 'T' was not declared in this scope
p949.cpp:168:10: error: 'container_compatible_range' has not been declared
168 | template<container_compatible_range<T> R>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:168:36: error: expected '>' before '<' token
168 | template<container_compatible_range<T> R>
| ^
p949.cpp:169:8: error: expected constructor, destructor, or type conversion before '(' token
169 | queue(from_range_t, R&& rg);
| ^
p949.cpp:172:28: error: expected constructor, destructor, or type conversion before '(' token
172 | template<class Alloc> queue(queue&& q, const Alloc& a);
| ^
p949.cpp:174:6: error: expected constructor, destructor, or type conversion before '(' token
174 | queue(InputIterator first, InputIterator last, const Alloc& alloc);
| ^
p949.cpp:176:37: error: 'T' was not declared in this scope
176 | template<container_compatible_range<T> R, class Alloc> queue(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:176:37: error: 'T' was not declared in this scope
p949.cpp:176:37: error: 'T' was not declared in this scope
p949.cpp:176:37: error: 'T' was not declared in this scope
p949.cpp:176:37: error: 'T' was not declared in this scope
p949.cpp:176:37: error: 'T' was not declared in this scope
p949.cpp:176:10: error: 'container_compatible_range' has not been declared
176 | template<container_compatible_range<T> R, class Alloc> queue(from_range_t, R&& rg, const Alloc& a);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:176:36: error: expected '>' before '<' token
176 | template<container_compatible_range<T> R, class Alloc> queue(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:176:61: error: expected constructor, destructor, or type conversion before '(' token
176 | template<container_compatible_range<T> R, class Alloc> queue(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:179:37: error: 'T' was not declared in this scope
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^
p949.cpp:179:37: error: 'T' was not declared in this scope
p949.cpp:179:37: error: 'T' was not declared in this scope
p949.cpp:179:37: error: 'T' was not declared in this scope
p949.cpp:179:37: error: 'T' was not declared in this scope
p949.cpp:179:37: error: 'T' was not declared in this scope
p949.cpp:179:10: error: 'container_compatible_range' has not been declared
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:179:36: error: expected '>' before '<' token
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^
p949.cpp:179:48: error: variable or field 'push_range' declared void
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^~~~~~~~~~
p949.cpp:179:59: error: 'R' was not declared in this scope
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^
p949.cpp:179:63: error: 'rg' was not declared in this scope
179 | template<container_compatible_range<T> R> void push_range(R&& rg);
| ^~
p949.cpp:183:25: error: 'queue<T, Container>' does not name a type
183 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:183:55: error: 'queue<T, Container>' does not name a type
183 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:183:8: error: 'bool operator==(const int&, const int&)' must have an argument of class or enumerated type
183 | bool operator==(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:185:31: error: 'T' was not declared in this scope
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:185:34: error: 'Container' was not declared in this scope
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:185:25: error: 'queue<<expression error>, <expression error> >' does not name a type
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:185:62: error: 'T' was not declared in this scope
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:185:65: error: 'Container' was not declared in this scope
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:185:56: error: 'queue<<expression error>, <expression error> >' does not name a type
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:185:8: error: 'bool operator!=(const int&, const int&)' must have an argument of class or enumerated type
185 | bool operator!=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:187:31: error: 'T' was not declared in this scope
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:187:34: error: 'Container' was not declared in this scope
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:187:25: error: 'queue<<expression error>, <expression error> >' does not name a type
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:187:61: error: 'T' was not declared in this scope
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:187:64: error: 'Container' was not declared in this scope
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:187:55: error: 'queue<<expression error>, <expression error> >' does not name a type
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:187:8: error: 'bool operator<(const int&, const int&)' must have an argument of class or enumerated type
187 | bool operator< (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:189:31: error: 'T' was not declared in this scope
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:189:34: error: 'Container' was not declared in this scope
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:189:25: error: 'queue<<expression error>, <expression error> >' does not name a type
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:189:61: error: 'T' was not declared in this scope
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:189:64: error: 'Container' was not declared in this scope
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:189:55: error: 'queue<<expression error>, <expression error> >' does not name a type
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:189:8: error: 'bool operator>(const int&, const int&)' must have an argument of class or enumerated type
189 | bool operator> (const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:191:29: error: 'T' was not declared in this scope
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:191:32: error: 'Container' was not declared in this scope
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:191:23: error: 'queue<<expression error>, <expression error> >' does not name a type
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:191:59: error: 'T' was not declared in this scope
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^
p949.cpp:191:62: error: 'Container' was not declared in this scope
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~
p949.cpp:191:53: error: 'queue<<expression error>, <expression error> >' does not name a type
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:191:6: error: 'bool operator<=(const int&, const int&)' must have an argument of class or enumerated type
191 | bool operator<=(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:194:27: error: 'queue<T, Container>' does not name a type
194 | bool operator>=(const queue<T, Container>& x,
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:195:22: error: 'queue<T, Container>' does not name a type
195 | const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:194:10: error: 'bool operator>=(const int&, const int&)' must have an argument of class or enumerated type
194 | bool operator>=(const queue<T, Container>& x,
| ^~~~~~~~
p949.cpp:199:23: error: 'queue<T, Container>' does not name a type
199 | operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:199:53: error: 'queue<T, Container>' does not name a type
199 | operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:199:5: error: 'std::compare_three_way_result_t<Container> operator<=>(const int&, const int&)' must have an argument of class or enumerated type
199 | operator<=>(const queue<T, Container>& x, const queue<T, Container>& y);
| ^~~~~~~~
p949.cpp:203:8: error: variable or field 'swap' declared void
203 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~
p949.cpp:203:34: error: 'x' was not declared in this scope
203 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:203:58: error: 'y' was not declared in this scope
203 | void swap(queue<T, Container>& x, queue<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:209:26: error: redefinition of default argument for 'class Container'
209 | template<class T, class Container = vector<T>,
| ^~~~~
p949.cpp:57:23: note: original definition appeared here
57 | template<class T, class Container = vector<T>,
| ^~~~~
p949.cpp:271:22: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
271 | class Compare = less<iter_value_type<InputIterator>>, class Container = vector<iter_value_type<InputIterator>>>
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:271:51: error: template argument 1 is invalid
271 | class Compare = less<iter_value_type<InputIterator>>, class Container = vector<iter_value_type<InputIterator>>>
| ^~
p949.cpp:271:80: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
271 | class Compare = less<iter_value_type<InputIterator>>, class Container = vector<iter_value_type<InputIterator>>>
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:271:109: error: template argument 1 is invalid
271 | e = less<iter_value_type<InputIterator>>, class Container = vector<iter_value_type<InputIterator>>>
| ^~
p949.cpp:271:109: error: template argument 2 is invalid
p949.cpp:272:110: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
272 | terator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_
p949.cpp:272:139: error: template argument 1 is invalid
272 | re = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^
p949.cpp:272:139: error: template argument 2 is invalid
p949.cpp:272:139: error: template argument 3 is invalid
p949.cpp:272:110: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
272 | terator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_
p949.cpp:272:139: error: template argument 1 is invalid
272 | re = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^
p949.cpp:272:139: error: template argument 2 is invalid
p949.cpp:272:139: error: template argument 3 is invalid
p949.cpp:272:110: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
272 | terator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_
p949.cpp:272:139: error: template argument 1 is invalid
272 | re = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^
p949.cpp:272:139: error: template argument 2 is invalid
p949.cpp:272:139: error: template argument 3 is invalid
p949.cpp:272:110: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
272 | terator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_
p949.cpp:272:139: error: template argument 1 is invalid
272 | re = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^
p949.cpp:272:139: error: template argument 2 is invalid
p949.cpp:272:139: error: template argument 3 is invalid
p949.cpp:272:95: error: invalid template-id
272 | ty_queue(InputIterator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^~~~~~~~~~~~~~
p949.cpp:272:110: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
272 | terator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_
p949.cpp:272:139: error: expected primary-expression before '>' token
272 | re = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^
p949.cpp:272:139: error: trailing return type 'priority_queue<...auto...>' of deduction guide is not a specialization of 'std::priority_queue<T, Container, Compare>'
p949.cpp:272:140: error: expected ';' before ',' token
272 | e = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^
| ;
p949.cpp:273:53: error: two or more data types in declaration of 'type name'
273 | template<ranges::input_range R, class Compare = less<ranges::range_value_t<R>>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p949.cpp:274:21: error: expected '>' before '(' token
274 | priority_queue(from_range_t, R&&, Compare = Compare())
| ^
p949.cpp:275:95: error: expected unqualified-id before ';' token
275 | -> priority_queue<ranges::range_value_t<R>, vector<ranges::range_value_t<R>>, Compare>;
| ^
p949.cpp:281:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:281:48: error: template argument 1 is invalid
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^
p949.cpp:281:48: error: template argument 2 is invalid
p949.cpp:281:48: error: template argument 3 is invalid
p949.cpp:281:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:281:48: error: template argument 1 is invalid
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^
p949.cpp:281:48: error: template argument 2 is invalid
p949.cpp:281:48: error: template argument 3 is invalid
p949.cpp:281:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:281:48: error: template argument 1 is invalid
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^
p949.cpp:281:48: error: template argument 2 is invalid
p949.cpp:281:48: error: template argument 3 is invalid
p949.cpp:281:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:281:48: error: template argument 1 is invalid
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^
p949.cpp:281:48: error: template argument 2 is invalid
p949.cpp:281:48: error: template argument 3 is invalid
p949.cpp:281:4: error: invalid template-id
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^~~~~~~~~~~~~~
p949.cpp:281:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:281:48: error: expected primary-expression before '>' token
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^
p949.cpp:281:48: error: trailing return type 'priority_queue<...auto...>' of deduction guide is not a specialization of 'std::priority_queue<T, Container, Compare>'
p949.cpp:281:49: error: expected ';' before ',' token
281 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>,
| ^
| ;
p949.cpp:285:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:285:48: error: template argument 1 is invalid
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^
p949.cpp:285:48: error: template argument 2 is invalid
p949.cpp:285:48: error: template argument 3 is invalid
p949.cpp:285:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:285:48: error: template argument 1 is invalid
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^
p949.cpp:285:48: error: template argument 2 is invalid
p949.cpp:285:48: error: template argument 3 is invalid
p949.cpp:285:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:285:48: error: template argument 1 is invalid
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^
p949.cpp:285:48: error: template argument 2 is invalid
p949.cpp:285:48: error: template argument 3 is invalid
p949.cpp:285:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:285:48: error: template argument 1 is invalid
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^
p949.cpp:285:48: error: template argument 2 is invalid
p949.cpp:285:48: error: template argument 3 is invalid
p949.cpp:285:4: error: invalid template-id
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^~~~~~~~~~~~~~
p949.cpp:285:19: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:285:48: error: expected primary-expression before '>' token
285 | -> priority_queue<iter_value_type<InputIterator>, vector<iter_value_type<InputIterator>, Allocator>, Compare>;
| ^
p949.cpp:285:48: error: trailing return type 'priority_queue<...auto...>' of deduction guide is not a specialization of 'std::priority_queue<T, Container, Compare>'
p949.cpp:284:7: error: deduction guide 'template<class InputIterator, class Compare, class Allocator> std::priority_queue(InputIterator, InputIterator, Compare, Allocator)-> priority_queue<...auto...>' redeclared
284 | priority_queue(InputIterator, InputIterator, Compare, Allocator)
| ^~~~~~~~~~~~~~
p949.cpp:272:1: note: 'template<class InputIterator, class Compare, class Container> std::priority_queue(InputIterator, InputIterator, Compare, Container)-> priority_queue<...auto...>' previously declared here
272 | priority_queue(InputIterator, InputIterator, Compare = Compare(), Container = Container()) -> priority_queue<iter_value_type<InputIterator>, Container, Compare>;
| ^~~~~~~~~~~~~~
p949.cpp:290:34: error: expected ')' before ',' token
290 | priority_queue(from_range_t, R&&, Compare, Allocator)
| ~ ^
| )
p949.cpp:294:34: error: expected ')' before ',' token
294 | priority_queue(from_range_t, R&&, Allocator)
| ~ ^
| )
p949.cpp:302:22: error: 'Compare' does not name a type
302 | priority_queue(const Compare& x, const Container& y);
| ^~~~~~~
p949.cpp:302:40: error: 'Container' does not name a type
302 | priority_queue(const Compare& x, const Container& y);
| ^~~~~~~~~
p949.cpp:302:1: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
302 | priority_queue(const Compare& x, const Container& y);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:303:22: error: 'Compare' does not name a type
303 | priority_queue(const Compare& x, Container&& y);
| ^~~~~~~
p949.cpp:303:34: error: 'Container' has not been declared
303 | priority_queue(const Compare& x, Container&& y);
| ^~~~~~~~~
p949.cpp:303:1: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
303 | priority_queue(const Compare& x, Container&& y);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:305:22: error: 'Compare' does not name a type
305 | priority_queue(const Compare& compare, const Container& cont, const Alloc& a);
| ^~~~~~~
p949.cpp:305:46: error: 'Container' does not name a type
305 | priority_queue(const Compare& compare, const Container& cont, const Alloc& a);
| ^~~~~~~~~
p949.cpp:305:69: error: 'Alloc' does not name a type; did you mean 'alloca'?
305 | priority_queue(const Compare& compare, const Container& cont, const Alloc& a);
| ^~~~~
| alloca
p949.cpp:305:1: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
305 | priority_queue(const Compare& compare, const Container& cont, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:309:35: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
309 | template<class Alloc> explicit priority_queue(const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:311:44: error: 'Compare' does not name a type
311 | template<class Alloc> priority_queue(const Compare& compare, const Alloc& a);
| ^~~~~~~
p949.cpp:311:23: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
311 | template<class Alloc> priority_queue(const Compare& compare, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:314:65: error: 'Compare' does not name a type
314 | priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare());
| ^~~~~~~
p949.cpp:314:78: error: there are no arguments to 'Compare' that depend on a template parameter, so a declaration of 'Compare' must be available [-fpermissive]
314 | priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare());
| ^~~~~~~
p949.cpp:314:78: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
p949.cpp:314:3: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
314 | priority_queue(InputIterator first, InputIterator last, const Compare& x = Compare());
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:317:1: error: 'comp' does not name a type
317 | comp with x; then calls make_heap(c.begin(), c.end(), comp).
| ^~~~
p949.cpp:317:14: error: 'then' does not name a type
317 | comp with x; then calls make_heap(c.begin(), c.end(), comp).
| ^~~~
p949.cpp:321:65: error: 'Compare' does not name a type
321 | priority_queue(InputIterator first, InputIterator last, const Compare& x, Container&& y);
| ^~~~~~~
p949.cpp:321:77: error: 'Container' has not been declared
321 | priority_queue(InputIterator first, InputIterator last, const Compare& x, Container&& y);
| ^~~~~~~~~
p949.cpp:321:3: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
321 | priority_queue(InputIterator first, InputIterator last, const Compare& x, Container&& y);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:324:1: error: 'calls' does not name a type
324 | calls c.insert(c.end(), first, last); and finally calls make_heap(c.begin(), c.end(), comp). template<container-compatible-range<T> R>
| ^~~~~
p949.cpp:324:51: error: expected constructor, destructor, or type conversion before 'calls'
324 | calls c.insert(c.end(), first, last); and finally calls make_heap(c.begin(), c.end(), comp). template<container-compatible-range<T> R>
| ^~~~~
p949.cpp:328:1: error: 'finally' does not name a type
328 | finally calls make_heap(c.begin(), c.end(), comp).
| ^~~~~~~
p949.cpp:333:38: error: template placeholder type 'const priority_queue<...auto...>' must be followed by a simple declarator-id
333 | template<class Alloc> priority_queue(const priority_queue& q, const Alloc& a);
| ^~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:333:61: error: expected ')' before ',' token
333 | template<class Alloc> priority_queue(const priority_queue& q, const Alloc& a);
| ~ ^
| )
p949.cpp:333:23: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
333 | template<class Alloc> priority_queue(const priority_queue& q, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:335:38: error: template placeholder type 'priority_queue<...auto...>' must be followed by a simple declarator-id
335 | template<class Alloc> priority_queue(priority_queue&& q, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:335:56: error: expected ')' before ',' token
335 | template<class Alloc> priority_queue(priority_queue&& q, const Alloc& a);
| ~ ^
| )
p949.cpp:335:23: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
335 | template<class Alloc> priority_queue(priority_queue&& q, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:338:3: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
338 | priority_queue(InputIterator first, InputIterator last, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:341:65: error: 'Compare' does not name a type
341 | priority_queue(InputIterator first, InputIterator last, const Compare& compare, const Alloc& a);
| ^~~~~~~
p949.cpp:341:3: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
341 | priority_queue(InputIterator first, InputIterator last, const Compare& compare, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:344:65: error: 'Compare' does not name a type
344 | priority_queue(InputIterator first, InputIterator last, const Compare& compare,
| ^~~~~~~
p949.cpp:345:19: error: 'Container' does not name a type
345 | const Container& cont, const Alloc& a);
| ^~~~~~~~~
p949.cpp:344:3: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
344 | priority_queue(InputIterator first, InputIterator last, const Compare& compare,
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:348:65: error: 'Compare' does not name a type
348 | priority_queue(InputIterator first, InputIterator last, const Compare& compare, Container&& cont,
| ^~~~~~~
p949.cpp:348:83: error: 'Container' has not been declared
348 | priority_queue(InputIterator first, InputIterator last, const Compare& compare, Container&& cont,
| ^~~~~~~~~
p949.cpp:348:3: error: deduction guide for 'std::priority_queue<T, Container, Compare>' must have trailing return type
348 | priority_queue(InputIterator first, InputIterator last, const Compare& compare, Container&& cont,
| ^~~~~~~~~~~~~~
p949.cpp:59:13: note: 'template<class T, class Container, class Compare> class std::priority_queue' declared here
59 | class priority_queue;
| ^~~~~~~~~~~~~~
p949.cpp:351:10: error: 'container' has not been declared
351 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Compare& compare, const Alloc& a);
| ^~~~~~~~~
p949.cpp:351:19: error: expected '>' before '-' token
351 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Compare& compare, const Alloc& a);
| ^
p949.cpp:351:83: error: expected ')' before ',' token
351 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Compare& compare, const Alloc& a);
| ~ ^
| )
p949.cpp:353:10: error: 'container' has not been declared
353 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Alloc& a);
| ^~~~~~~~~
p949.cpp:353:19: error: expected '>' before '-' token
353 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:353:83: error: expected ')' before ',' token
353 | template<container-compatible-range<T> R, class Alloc> priority_queue(from_range_t, R&& rg, const Alloc& a);
| ~ ^
| )
p949.cpp:356:17: error: 'value_type' does not name a type
356 | void push(const value_type& x);
| ^~~~~~~~~~
p949.cpp:358:12: error: expected constructor, destructor, or type conversion before '(' token
358 | push_heap(c.begin(), c.end(), comp);
| ^
p949.cpp:359:6: error: variable or field 'push' declared void
359 | void push(value_type&& x);
| ^~~~
p949.cpp:359:11: error: 'value_type' was not declared in this scope
359 | void push(value_type&& x);
| ^~~~~~~~~~
p949.cpp:359:24: error: 'x' was not declared in this scope
359 | void push(value_type&& x);
| ^
p949.cpp:361:12: error: expected constructor, destructor, or type conversion before '(' token
361 | push_heap(c.begin(), c.end(), comp);
| ^
p949.cpp:362:10: error: 'container' has not been declared
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~~~~~~~~
p949.cpp:362:19: error: expected '>' before '-' token
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^
p949.cpp:362:48: error: variable or field 'push_range' declared void
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~~~~~~~~~
p949.cpp:362:59: error: 'R' was not declared in this scope
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^
p949.cpp:362:63: error: 'rg' was not declared in this scope
362 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~
p949.cpp:367:12: error: expected constructor, destructor, or type conversion before '(' token
367 | push_heap(c.begin(), c.end(), comp);
| ^
p949.cpp:370:9: error: expected constructor, destructor, or type conversion before '(' token
370 | pop_heap(c.begin(), c.end(), comp);
| ^
p949.cpp:371:3: error: 'c' does not name a type
371 | c.pop_back();
| ^
p949.cpp:380:44: error: 'deque' does not name a type
380 | template<class T, class Container = deque<T>>
| ^~~~~
p949.cpp:380:49: error: expected '>' before '<' token
380 | template<class T, class Container = deque<T>>
| ^
p949.cpp:381:20: error: expected unqualified-id before '{' token
381 | class stack {
| ^
p949.cpp:411:30: error: 'stack' does not name a type; did you mean 'obstack'?
411 | stack(Container) -> stack<typename Container::value_type, Container>;
| ^~~~~
| obstack
p949.cpp:411:35: error: expected constructor, destructor, or type conversion before '<' token
411 | stack(Container) -> stack<typename Container::value_type, Container>;
| ^
p949.cpp:414:34: error: expected initializer before 'size_type'
414 | [[nodiscard]] bool empty() const size_type size() const
| ^~~~~~~~~
p949.cpp:418:1: error: expected unqualified-id before '{' token
418 | { return c.size(); }
| ^
p949.cpp:419:1: error: expected unqualified-id before '{' token
419 | { return c.back(); }
| ^
p949.cpp:420:1: error: expected unqualified-id before '{' token
420 | { return c.back(); }
| ^
p949.cpp:421:1: error: expected unqualified-id before '{' token
421 | { c.push_back(x); }
| ^
p949.cpp:422:1: error: expected unqualified-id before '{' token
422 | { c.push_back(std::move(x)); }
| ^
p949.cpp:425:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:425:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:425:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:425:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:425:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:425:46: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:425:40: error: 'stack' does not name a type; did you mean 'obstack'?
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^~~~~
| obstack
p949.cpp:425:45: error: expected constructor, destructor, or type conversion before '<' token
425 | stack(InputIterator, InputIterator) -> stack<iter_value_type<InputIterator>>;
| ^
p949.cpp:427:12: error: expected constructor, destructor, or type conversion before '(' token
427 | stack(from_range_t, R&&) -> stack<ranges::range_value_t<R>>;
| ^
p949.cpp:429:38: error: 'stack' does not name a type; did you mean 'obstack'?
429 | stack(Container, Allocator) -> stack<typename Container::value_type, Container>;
| ^~~~~
| obstack
p949.cpp:429:43: error: expected constructor, destructor, or type conversion before '<' token
429 | stack(Container, Allocator) -> stack<typename Container::value_type, Container>;
| ^
p949.cpp:432:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:432:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:432:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:432:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:432:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:432:10: error: 'iter_value_type' was not declared in this scope; did you mean 'iter_value_t'?
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~~~~~~~~~~~
| iter_value_t
p949.cpp:432:4: error: 'stack' does not name a type; did you mean 'obstack'?
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^~~~~
| obstack
p949.cpp:432:9: error: expected constructor, destructor, or type conversion before '<' token
432 | -> stack<iter_value_type<InputIterator>, deque<iter_value_type<InputIterator>, Allocator>>;
| ^
p949.cpp:434:12: error: expected constructor, destructor, or type conversion before '(' token
434 | stack(from_range_t, R&&, Allocator)
| ^
p949.cpp:437:29: error: 'stack' was not declared in this scope
437 | struct uses_allocator<stack<T, Container>, Alloc>
| ^~~~~
p949.cpp:437:29: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
p949.cpp:437:47: error: template argument 1 is invalid
437 | struct uses_allocator<stack<T, Container>, Alloc>
| ^
p949.cpp:441:22: error: 'Container' does not name a type
441 | explicit stack(const Container& cont);
| ^~~~~~~~~
p949.cpp:441:10: error: ISO C++ forbids declaration of 'stack' with no type [-fpermissive]
441 | explicit stack(const Container& cont);
| ^~~~~
p949.cpp:441:1: error: 'explicit' outside class declaration
441 | explicit stack(const Container& cont);
| ^~~~~~~~
p949.cpp:444:8: error: expected constructor, destructor, or type conversion before '(' token
444 | stack(InputIterator first, InputIterator last);
| ^
p949.cpp:446:35: error: ISO C++ forbids declaration of 'stack' with no type [-fpermissive]
446 | template<class Alloc> explicit stack(const Alloc& a);
| ^~~~~
p949.cpp:446:26: error: 'explicit' outside class declaration
446 | template<class Alloc> explicit stack(const Alloc& a);
| ^~~~~~~~
p949.cpp:448:35: error: 'container_type' does not name a type
448 | template<class Alloc> stack(const container_type& cont, const Alloc& a);
| ^~~~~~~~~~~~~~
p949.cpp:448:72: error: expected constructor, destructor, or type conversion before ';' token
448 | template<class Alloc> stack(const container_type& cont, const Alloc& a);
| ^
p949.cpp:453:8: error: expected constructor, destructor, or type conversion before '(' token
453 | stack(from_range_t, R&& rg);
| ^
p949.cpp:457:72: error: expected constructor, destructor, or type conversion before ';' token
457 | stack(InputIterator first, InputIterator last, const Alloc& alloc);
| ^
p949.cpp:459:10: error: 'container' has not been declared
459 | template<container-compatible-range<T> R, class Alloc> stack(from_range_t, R&& rg, const Alloc& a);
| ^~~~~~~~~
p949.cpp:459:19: error: expected '>' before '-' token
459 | template<container-compatible-range<T> R, class Alloc> stack(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:459:61: error: expected constructor, destructor, or type conversion before '(' token
459 | template<container-compatible-range<T> R, class Alloc> stack(from_range_t, R&& rg, const Alloc& a);
| ^
p949.cpp:462:10: error: 'container' has not been declared
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~~~~~~~~
p949.cpp:462:19: error: expected '>' before '-' token
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^
p949.cpp:462:48: error: variable or field 'push_range' declared void
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~~~~~~~~~
p949.cpp:462:59: error: 'R' was not declared in this scope
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^
p949.cpp:462:63: error: 'rg' was not declared in this scope
462 | template<container-compatible-range<T> R> void push_range(R&& rg);
| ^~
p949.cpp:466:25: error: 'stack<T, Container>' does not name a type
466 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:466:55: error: 'stack<T, Container>' does not name a type
466 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:466:8: error: 'bool operator==(const int&, const int&)' must have an argument of class or enumerated type
466 | bool operator==(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:468:31: error: 'T' was not declared in this scope
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:468:34: error: 'Container' was not declared in this scope
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:468:25: error: 'stack<<expression error>, <expression error> >' does not name a type
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:468:61: error: 'T' was not declared in this scope
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:468:64: error: 'Container' was not declared in this scope
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:468:55: error: 'stack<<expression error>, <expression error> >' does not name a type
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:468:8: error: 'bool operator!=(const int&, const int&)' must have an argument of class or enumerated type
468 | bool operator!=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:470:31: error: 'T' was not declared in this scope
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:470:34: error: 'Container' was not declared in this scope
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:470:25: error: 'stack<<expression error>, <expression error> >' does not name a type
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:470:61: error: 'T' was not declared in this scope
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:470:64: error: 'Container' was not declared in this scope
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:470:55: error: 'stack<<expression error>, <expression error> >' does not name a type
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:470:8: error: 'bool operator<(const int&, const int&)' must have an argument of class or enumerated type
470 | bool operator< (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:472:31: error: 'T' was not declared in this scope
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:472:34: error: 'Container' was not declared in this scope
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:472:25: error: 'stack<<expression error>, <expression error> >' does not name a type
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:472:61: error: 'T' was not declared in this scope
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:472:64: error: 'Container' was not declared in this scope
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:472:55: error: 'stack<<expression error>, <expression error> >' does not name a type
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:472:8: error: 'bool operator>(const int&, const int&)' must have an argument of class or enumerated type
472 | bool operator> (const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:474:31: error: 'T' was not declared in this scope
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:474:34: error: 'Container' was not declared in this scope
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:474:25: error: 'stack<<expression error>, <expression error> >' does not name a type
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:474:61: error: 'T' was not declared in this scope
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:474:64: error: 'Container' was not declared in this scope
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:474:55: error: 'stack<<expression error>, <expression error> >' does not name a type
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:474:8: error: 'bool operator<=(const int&, const int&)' must have an argument of class or enumerated type
474 | bool operator<=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:476:29: error: 'T' was not declared in this scope
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:476:32: error: 'Container' was not declared in this scope
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:476:23: error: 'stack<<expression error>, <expression error> >' does not name a type
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:476:59: error: 'T' was not declared in this scope
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^
p949.cpp:476:62: error: 'Container' was not declared in this scope
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~
p949.cpp:476:53: error: 'stack<<expression error>, <expression error> >' does not name a type
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:476:6: error: 'bool operator>=(const int&, const int&)' must have an argument of class or enumerated type
476 | bool operator>=(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:480:23: error: 'stack<T, Container>' does not name a type
480 | operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:480:53: error: 'stack<T, Container>' does not name a type
480 | operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~~~~~~~~~~~~
p949.cpp:480:5: error: 'std::compare_three_way_result_t<Container> operator<=>(const int&, const int&)' must have an argument of class or enumerated type
480 | operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
| ^~~~~~~~
p949.cpp:484:8: error: variable or field 'swap' declared void
484 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^~~~
p949.cpp:484:34: error: 'x' was not declared in this scope
484 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
p949.cpp:484:58: error: 'y' was not declared in this scope
484 | void swap(stack<T, Container>& x, stack<T, Container>& y) noexcept(noexcept(x.swap(y)));
| ^
検討事項(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 初稿 20220807