はじめに(Introduction)
N4910 Working Draft, Standard for Programming Language C++
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.
26.5 Range utilities [range.utility] C++N4910:2022 (653) p1042.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 = "26.5 Range utilities [range.utility] C++N4910:2022 (653) p1042.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;
// 26.5.1 General [range.utility.general]
// The components in 26.5 are general utilities for representing and manipulating ranges.
// 26.5.2 Helper concepts [range.utility.helpers]
// Many of the types in subclause 26.5 are specified in terms of the following exposition-only concepts:
template<class R> concept simple-view =
view<R> && range<const R> &&
same_as<iterator_t<R>, iterator_t<const R>> &&
same_as<sentinel_t<R>, sentinel_t<const R>>;
template<class I> concept has-arrow =
// exposition only
// exposition only
input_iterator<I> && (is_pointer_v<I> || requires(I i) {
i.operator->();
});
template<class T, class U>
concept different-from = // exposition only
!same_as<remove_cvref_t<T>, remove_cvref_t<U>>;
// exposition only
// 26.5.3 View interface [view.interface]
// 26.5.3.1 General [view.interface.general]
// The class template view_interface is a helper for defining view-like types that offer a container-like interface.
// It is parameterized with the type that is derived from it.
namespace std::ranges {
template<class D>
requires is_class_v<D> && same_as<D, remove_cv_t<D>>
class view_interface {
private:
constexpr D& derived() noexcept {
return static_cast<D&>(*this);
}
constexpr const D& derived() const noexcept {
return static_cast<const D&>(*this);
}
// exposition only // exposition only
public:
constexpr bool empty() requires forward_range<D> {
return ranges::begin(derived()) == ranges::end(derived());
}
constexpr bool empty() const requires forward_range<const D> { return ranges::begin(derived()) == ranges::end(derived());
}
constexpr explicit operator bool()
requires requires { ranges::empty(derived()); } {
return !ranges::empty(derived());
}
constexpr explicit operator bool() const
requires requires {
ranges::empty(derived());
} {
return !ranges::empty(derived());
}
constexpr auto data() requires contiguous_iterator<iterator_t<D>> {
return to_address(ranges::begin(derived()));
}
constexpr auto data() const
requires range<const D> && contiguous_iterator<iterator_t<const D>> {
return to_address(ranges::begin(derived()));
}
constexpr auto size() requires forward_range<D> &&
sized_sentinel_for<sentinel_t<D>, iterator_t<D>> {
return ranges::end(derived()) - ranges::begin(derived());
}
constexpr auto size() const requires forward_range<const D> &&
sized_sentinel_for<sentinel_t<const D>, iterator_t<const D>> {
return ranges::end(derived()) - ranges::begin(derived());
}
constexpr decltype(auto) front() requires forward_range<D>;
constexpr decltype(auto) front() const requires forward_range<const D>;
constexpr decltype(auto) back() requires bidirectional_range<D> && common_range<D>;
constexpr decltype(auto) back() const
requires bidirectional_range<const D> && common_range<const D>;
template<random_access_range R = D>
constexpr decltype(auto) operator[](range_difference_t<R> n) {
return ranges::begin(derived())[n];
}
template<random_access_range R = const D>
constexpr decltype(auto) operator[](range_difference_t<R> n) const {
return ranges::begin(derived())[n];
}
};
}
// The template parameter D for view_interface may be an incomplete type. Before any member of the resulting specialization of view_interface other than special member functions is referenced, D shall be complete, and model both derived_from<view_interface<D>> and view.
// 26.5.3.2 Members [vew.interface.members]
constexpr decltype(auto) front() requires forward_range<D>;
constexpr decltype(auto) front() const requires forward_range<const D>;
// Preconditions: !empty() is true.
// Effects: Equivalent to: return *ranges::begin(derived ());
// The subrange class template combines together an iterator and a sentinel into a single object that models the view concept. Additionally, it models the sized_range concept when the final template parameter is subrange_kind::sized.
namespace std::ranges {
template<class From, class To>
concept uses-nonqualification-pointer-conversion = // exposition only is_pointer_v<From> && is_pointer_v<To> && !convertible_to<remove_pointer_t<From>(*)[], remove_pointer_t<To>(*)[]>;
template<class From, class To>
concept convertible-to-non-slicing = // exposition only
convertible_to<From, To> && !uses-nonqualification-pointer-conversion<decay_t<From>, decay_t<To>>;
template<class T>
concept pair-like = // exposition only
!is_reference_v<T> && requires(T t) {
typename tuple_size<T>::type; // ensures tuple_size<T> is complete requires derived_from<tuple_size<T>, integral_constant<size_t, 2>>;
typename tuple_element_t<0, remove_const_t<T>>;
typename tuple_element_t<1, remove_const_t<T>>;
{
std::get<0>(t)
}
-> convertible_to<const tuple_element_t<0, T>&>;
{
std::get<1>(t)
}
-> convertible_to<const tuple_element_t<1, T>&>;
};
template<class T, class U, class V>
concept pair-like-convertible-from = // exposition only
!range<T> && pair-like<T> &&
constructible_from<T, U, V> && convertible-to-non-slicing<U, tuple_element_t<0, T>> && convertible_to<V, tuple_element_t<1, T>>;
constexpr decltype(auto) back() requires bidirectional_range<D> && common_range<D>;
constexpr decltype(auto) back() const
requires bidirectional_range<const D> && common_range<const D>;
// Preconditions: !empty() is true.
// Effects: Equivalent to: return *ranges::prev(ranges::end(derived ()));
// 26.5.4 Sub-ranges [range.subrange]
// 26.5.4.1 General [range.subrange.general]
template<input_or_output_iterator I, sentinel_for<I> S = I, subrange_kind K =
sized_sentinel_for<S, I> ? subrange_kind::sized : subrange_kind::unsized>
requires (K == subrange_kind::sized || !sized_sentinel_for<S, I>)
class subrange : public view_interface<subrange<I, S, K>> {
private:
static constexpr bool StoreSize = // exposition only K == subrange_kind::sized && !sized_sentinel_for<S, I>;
I begin_ = I();
S end_ = S();
make-unsigned-like-t<iter_difference_t<I>> size_ = 0;
public:
subrange() requires default_initializable<I> = default;
// exposition only
// exposition only
// exposition only; present only // when StoreSize is true
constexpr subrange(convertible-to-non-slicing<I> auto i, S s) requires (!StoreSize);
constexpr subrange(convertible-to-non-slicing<I> auto i, S s, make-unsigned-like-t<iter_difference_t<I>> n)
requires (K == subrange_kind::sized);
template<different-from<subrange> R> requires borrowed_range<R> &&
convertible-to-non-slicing<iterator_t<R>, I> &&
convertible_to<sentinel_t<R>, S>
constexpr subrange(R&& r) requires (!StoreSize || sized_range<R>);
template<borrowed_range R>
requires convertible-to-non-slicing<iterator_t<R>, I> &&
convertible_to<sentinel_t<R>, S>
constexpr subrange(R&& r, make-unsigned-like-t<iter_difference_t<I>> n)
requires (K == subrange_kind::sized)
: subrange{ranges::begin(r), ranges::end(r), n} {}
template<different-from<subrange> PairLike>
requires pair-like-convertible-from<PairLike, const I&, const S&>
constexpr operator PairLike() const;
constexpr I begin() const requires copyable<I>;
[[nodiscard]] constexpr I begin() requires (!copyable<I>);
constexpr S end() const;
constexpr bool empty() const;
constexpr make-unsigned-like-t<iter_difference_t<I>> size() const
requires (K == subrange_kind::sized);
[[nodiscard]] constexpr subrange next(iter_difference_t<I> n = 1) const &
requires forward_iterator<I>;
[[nodiscard]] constexpr subrange next(iter_difference_t<I> n = 1) &&;
[[nodiscard]] constexpr subrange prev(iter_difference_t<I> n = 1) const
requires bidirectional_iterator<I>;
constexpr subrange& advance(iter_difference_t<I> n);
};
template<input_or_output_iterator I, sentinel_for<I> S>
subrange(I, S) -> subrange<I, S>;
template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
subrange<I, S, subrange_kind::sized>;
template<borrowed_range R>
subrange(R&&) ->
subrange<iterator_t<R>, sentinel_t<R>,
(sized_range<R> || sized_sentinel_for<sentinel_t<R>, iterator_t<R>>)
constexpr subrange(convertible-to-non-slicing<I> auto i, S s) requires (!StoreSize);
// Preconditions: [i, s) is a valid range.
// Effects: Initializes begin_ with std::move(i) and end_ with s.
constexpr subrange(convertible-to-non-slicing<I> auto i, S s, make-unsigned-like-t<iter_difference_t<I>> n)
? subrange_kind::sized : subrange_kind::unsized>;
template<borrowed_range R>
subrange(R&&, make-unsigned-like-t<range_difference_t<R>>) ->
subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
template<size_t N, class I, class S, subrange_kind K>
requires ((N == 0 && copyable<I>) || N == 1)
constexpr auto get(const subrange<I, S, K>& r);
template<size_t N, class I, class S, subrange_kind K>
requires (N < 2)
constexpr auto get(subrange<I, S, K>&& r);
}
namespace std {
using ranges::get;
}
// 26.5.4.2 Constructors and conversions [range.subrange.ctor]
requires (K == subrange_kind::sized);
// Preconditions: [i,s) is a valid range, and n == to-unsigned-like(ranges::distance(i, s)) is true.
// Effects: Initializes begin_ with std::move(i) and end_ with s. If StoreSize is true, initializes size_ with n.
// [Note 1: Accepting the length of the range and storing it to later return from size() enables subrange to model sized_range even when it stores an iterator and sentinel that do not model sized_sentinel_for. —end note]
template<different-from<subrange> R> requires borrowed_range<R> &&
convertible-to-non-slicing<iterator_t<R>, I> &&
convertible_to<sentinel_t<R>, S>
constexpr subrange(R&& r) requires (!StoreSize || sized_range<R>);
// Effects: Equivalent to:
// — If StoreSize is true, subrange(r, static_cast<decltype(size_)>(ranges::size(r))). — Otherwise, subrange(ranges::begin(r), ranges::end(r)).
template<different-from<subrange> PairLike>
requires pair-like-convertible-from<PairLike, const I&, const S&>
constexpr operator PairLike() const;
// Effects: Equivalent to: return PairLike(begin_, end_);
// 26.5.4.3 Accessors [range.subrange.access]
constexpr I begin() const requires copyable<I>;
// Effects: Equivalent to: return begin_;
[[nodiscard]] constexpr I begin() requires (!copyable<I>);
// Effects: Equivalent to: return std::move(begin_); constexpr S end() const;
// Effects: Equivalent to: return end_;
constexpr bool empty() const;
// Effects: Equivalent to: return begin_ == end_;
constexpr make-unsigned-like-t<iter_difference_t<I>> size() const
// Effects: Equivalent to:
if constexpr (N == 0)
return r.begin();
else
return r.end();
requires (K == subrange_kind::sized);
// Effects:— If StoreSize is true, equivalent to: return size_;
// — Otherwise, equivalent to: return to-unsigned-like(end_ - begin_);
[[nodiscard]] constexpr subrange next(iter_difference_t<I> n = 1) const &
requires forward_iterator<I>;
// Effects: Equivalent to:
auto tmp = *this;
tmp.advance(n);
return tmp;
[[nodiscard]] constexpr subrange next(iter_difference_t<I> n = 1) &&;
// Effects: Equivalent to: advance(n);
return std::move(*this);
[[nodiscard]] constexpr subrange prev(iter_difference_t<I> n = 1) const
requires bidirectional_iterator<I>;
// Effects: Equivalent to:
auto tmp = *this;
tmp.advance(-n);
return tmp;
constexpr subrange& advance(iter_difference_t<I> n);
// Effects: Equivalent to:
if constexpr (bidirectional_iterator<I>) {
if (n < 0) {
ranges::advance(begin_, n);
if constexpr (StoreSize)
size_ += to-unsigned-like(-n);
return *this;
}
}
auto d = n - ranges::advance(begin_, n, end_);
if constexpr (StoreSize)
size_ -= to-unsigned-like(d);
return *this;
template<size_t N, class I, class S, subrange_kind K>
requires ((N == 0 && copyable<I>) || N == 1)
constexpr auto get(const subrange<I, S, K>& r);
template<size_t N, class I, class S, subrange_kind K>
requires (N < 2)
constexpr auto get(subrange<I, S, K>&& r);
// 26.5.5 Dangling iterator handling [range.dangling]
// The tag type dangling is used together with the template aliases borrowed_iterator_t and borrowed_- subrange_t. When an algorithm that typically returns an iterator into, or a subrange of, a range argument is called with an rvalue range argument that does not model borrowed_range (26.4.2), the return value possibly refers to a range whose lifetime has ended. In such cases, the tag type dangling is returned instead of an iterator or subrange.
namespace std::ranges {
struct dangling {
constexpr dangling() noexcept = default;
constexpr dangling(auto&&...) noexcept {}
};
}
// [Example 1 :
vector<int> f();
auto result1 = ranges::find(f(), 42);
static_assert(same_as<decltype(result1), ranges::dangling>);
auto vec = f();
auto result2 = ranges::find(vec, 42);
static_assert(same_as<decltype(result2), vector<int>::iterator>);
auto result3 = ranges::find(ranges::subrange {
vec
}, 42);
static_assert(same_as<decltype(result3), vector<int>::iterator>);
// #1
// #2 // #3
// The call to ranges::find at #1 returns ranges::dangling since f() is an rvalue vector; it is possible for the vector to be destroyed before a returned iterator is dereferenced. However, the calls at #2 and #3 both return iterators since the lvalue vec and specializations of subrange model borrowed_range. —end example]
// For a type R that models range:
// — if R models borrowed_range, then borrowed_iterator_t<R> denotes iterator_t<R>, and borrowed_- subrange_t<R> denotes subrange<iterator_t<R>>;
// — otherwise, both borrowed_iterator_t<R> and borrowed_subrange_t<R> denote dangling.
// The range conversion functions construct an object (usually a container) from a range, by using a constructor taking a range, a from_range_t tagged constructor, or a constructor taking a pair of iterators, or by inserting each element of the range into the default-constructed object.
// ranges::to is applied recursively, allowing the conversion of a range of ranges. [Example 1:
string_view str = "the quick brown fox";
auto words = views::split(str, ' ') | to<vector<string>>(); // words is vector<string>{"the", "quick", "brown", "fox"}
// Let reservable-container be defined as follows:
template<class Container>
constexpr bool reservable-container = // exposition only
sized_range<Container> &&
requires(Container& c, range_size_t<Container> n) {
// 26.5.6 Range conversions [range.utility.conv]
// 26.5.6.1 General [range.utility.conv.general]
c.reserve(n);
{
c.capacity()
}
-> same_as<decltype(n)>;
{
c.max_size()
}
-> same_as<decltype(n)>;
};
// Let container-insertable be defined as follows:
template<class Container, class Ref> constexpr bool container-insertable = requires(Container& c, Ref&& ref) {
// exposition only
requires (requires { c.push_back(std::forward<Ref>(ref)); } ||
requires { c.insert(c.end(), std::forward<Ref>(ref)); });
};
// Returns: An object of type C constructed from the elements of r in the following manner: — If convertible_to<range_reference_t<R>, range_value_t<C>> is true:
// — If constructible_from<C, R, Args...> is true: C(std::forward<R>(r), std::forward<Args>(args)...)
// — Otherwise, if constructible_from<C, from_range_t, R, Args...> is true: C(from_range, std::forward<R>(r), std::forward<Args>(args)...)
// — Otherwise, if
// — common_range<R> is true,
// — cpp17-input-iterator <iterator_t<R>> is true, and
// — constructible_from<C, iterator_t<R>, sentinel_t<R>, Args...> is true:
C(ranges::begin(r), ranges::end(r), std::forward<Args>(args)...)
// — Otherwise, if
// — constructible_from<C, Args...> is true, and
// — container-insertable <C, range_reference_t<R>> is true:
C c(std::forward<Args>(args)...);
if constexpr (sized_range<R> && reservable-container<C>)
c.reserve(ranges::size(r));
ranges::copy(r, container-inserter<range_reference_t<R>>(c));
// — Otherwise, if input_range<range_reference_t<R>> is true:
to<C>(r | views::transform([](auto&& elem) {
return to<range_value_t<C>>(std::forward<decltype(elem)>(elem));
}), std::forward<Args>(args)...);
// — Otherwise, the program is ill-formed.
// [Note 1: input-iterator meets the syntactic requirements of Cpp17InputIterator. —end note] Let DEDUCE_EXPR be defined as follows:
// Let container-inserter be defined as follows:
template<typename Ref>
auto container-inserter (C& c) { // exposition only
if constexpr (requires { c.push_back(declval<Ref>()); })
return back_inserter(c);
else
return inserter(c, c.end());
};
// 26.5.6.2 ranges::to [range.utility.conv.to]
template<class C, input_range R, class... Args> requires (!view<C>)
constexpr C to(R&& r, Args&&... args);
template<template<class...> class C, input_range R, class... Args>
constexpr auto to(R&& r, Args&&... args);
// Let input-iterator be an exposition-only type:
struct input-iterator {
using iterator_category = input_iterator_tag;
using value_type = range_value_t<R>;
using difference_type = ptrdiff_t;
using pointer = add_pointer_t<range_reference_t<R>>;
using reference = range_reference_t<R>;
reference operator*() const;
pointer operator->() const;
input-iterator& operator++();
input-iterator operator++(int);
bool operator==(const input-iterator&) const;
};
// — C(declval<R>(), declval<Args>()...) if that is a valid expression,
// — otherwise, C(from_range, declval<R>(), declval<Args>()...) if that is a valid expression,
// — otherwise, C(declval<input-iterator>(), declval<input-iterator>(), declval<Args>()...) if that is a valid expression,
// — otherwise, the program is ill-formed.
// Returns: to<decltype(DEDUCE_EXPR)>(std::forward<R>(r), std::forward<Args>(args)...).
// 26.5.6.3 ranges::to adaptors [range.utility.conv.adaptors]
template<class C, class... Args> requires (!view<C>)
constexpr auto to(Args&&... args);
template<template<class...> class C, class... Args>
constexpr auto to(Args&&... args);
//Returns: A range adaptor closure object (26.7.2) f that is a perfect forwarding call wrapper (22.10.4) with the following properties:
// — It has no target object.
// — Its bound argument entities bound_args consist of objects of types decay_t<Args>... direct-non-list-initialized with std::forward<Args>(args)..., respectively.
// — Its call pattern is to<C>(r, bound_args...), where r is the argument used in a function call expression of f.
int main() {
cout << n4910 << endl;
return EXIT_SUCCESS;
}
編纂・実行結果(compile and go)
$ clang++ p1042.cpp -std=03 -o p1042l -I. -Wall
In file included from p1042.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 \
^
p1042.cpp:18:19: error: unknown type name 'concept'
template<class R> concept simple-view =
^
p1042.cpp:18:27: warning: variable templates are a C++14 extension [-Wc++14-extensions]
template<class R> concept simple-view =
^
p1042.cpp:18:33: error: expected ';' at end of declaration
template<class R> concept simple-view =
^
;
p1042.cpp:18:33: error: expected external declaration
p1042.cpp:18:34: error: C++ requires a type specifier for all declarations
template<class R> concept simple-view =
^
p1042.cpp:19:10: error: use of undeclared identifier 'R'
view<R> && range<const R> &&
^
p1042.cpp:19:16: error: use of address-of-label extension outside of a function body
view<R> && range<const R> &&
^
p1042.cpp:20:45: error: unknown type name 'R'
same_as<iterator_t<R>, iterator_t<const R>> &&
^
p1042.cpp:21:45: error: unknown type name 'R'
same_as<sentinel_t<R>, sentinel_t<const R>>;
^
p1042.cpp:21:48: error: expected '>'
same_as<sentinel_t<R>, sentinel_t<const R>>;
^
p1042.cpp:21:38: note: to match this '<'
same_as<sentinel_t<R>, sentinel_t<const R>>;
^
p1042.cpp:21:48: error: expected unqualified-id
same_as<sentinel_t<R>, sentinel_t<const R>>;
^
p1042.cpp:22:19: error: unknown type name 'concept'
template<class I> concept has-arrow =
^
p1042.cpp:22:27: warning: variable templates are a C++14 extension [-Wc++14-extensions]
template<class I> concept has-arrow =
^
p1042.cpp:22:30: error: expected ';' at end of declaration
template<class I> concept has-arrow =
^
;
p1042.cpp:22:30: error: expected external declaration
p1042.cpp:22:31: error: C++ requires a type specifier for all declarations
template<class I> concept has-arrow =
^
p1042.cpp:25:20: error: use of undeclared identifier 'I'
input_iterator<I> && (is_pointer_v<I> || requires(I i) { i.operator->(); });
^
p1042.cpp:25:40: error: use of undeclared identifier 'I'
input_iterator<I> && (is_pointer_v<I> || requires(I i) { i.operator->(); });
^
p1042.cpp:25:55: error: use of undeclared identifier 'I'
input_iterator<I> && (is_pointer_v<I> || requires(I i) { i.operator->(); });
^
p1042.cpp:27:1: error: unknown type name 'concept'
concept different-from = // exposition only
^
p1042.cpp:27:9: warning: variable templates are a C++14 extension [-Wc++14-extensions]
concept different-from = // exposition only
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
$ clang++ p1042.cpp -std=2b -o p1042l -I. -Wall
p1042.cpp:18:33: error: expected '='
template<class R> concept simple-view =
^
p1042.cpp:22:30: error: expected '='
template<class I> concept has-arrow =
^
p1042.cpp:27:18: error: expected '='
concept different-from = // exposition only
^
p1042.cpp:37:14: error: redefinition of 'view_interface'
class view_interface {
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:99:11: note: previous definition is here
class view_interface : public view_base
^
p1042.cpp:81:57: error: use of undeclared identifier 'D'
constexpr decltype(auto) front() requires forward_range<D>;
^
p1042.cpp:82:69: error: unknown type name 'D'
constexpr decltype(auto) front() const requires forward_range<const D>;
^
p1042.cpp:82:34: error: non-member function cannot have 'const' qualifier
constexpr decltype(auto) front() const requires forward_range<const D>;
^~~~~~
p1042.cpp:88:13: error: expected '='
concept uses-nonqualification-pointer-conversion = // exposition only is_pointer_v<From> && is_pointer_v<To> && !convertible_to<remove_pointer_t<From>(*)[], remove_pointer_t<To>(*)[]>;
^
p1042.cpp:93:13: error: expected '='
concept pair-like = // exposition only
^
p1042.cpp:102:13: error: expected '='
concept pair-like-convertible-from = // exposition only
^
p1042.cpp:105:62: error: use of undeclared identifier 'D'
constexpr decltype(auto) back() requires bidirectional_range<D> && common_range<D>;
^
p1042.cpp:107:36: error: unknown type name 'D'
requires bidirectional_range<const D> && common_range<const D>;
^
p1042.cpp:106:33: error: non-member function cannot have 'const' qualifier
constexpr decltype(auto) back() const
^~~~~
p1042.cpp:115:7: error: redefinition of 'subrange'
class subrange : public view_interface<subrange<I, S, K>> {
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:238:11: note: previous definition is here
class subrange : public view_interface<subrange<_It, _Sent, _Kind>>
^
p1042.cpp:155:3: error: redeclaration of deduction guide
subrange(I, S) -> subrange<I, S>;
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ranges:383:5: note: previous declaration is here
subrange(_It, _Sent) -> subrange<_It, _Sent>;
^
p1042.cpp:156:72: error: unknown type name 'make'
template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
^
p1042.cpp:156:76: error: expected ')'
template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
^
p1042.cpp:156:65: note: to match this '('
template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
^
p1042.cpp:161:82: error: expected '>'
(sized_range<R> || sized_sentinel_for<sentinel_t<R>, iterator_t<R>>)
^
p1042.cpp:160:13: note: to match this '<'
subrange<iterator_t<R>, sentinel_t<R>,
^
p1042.cpp:161:82: error: expected ';' at end of declaration
(sized_range<R> || sized_sentinel_for<sentinel_t<R>, iterator_t<R>>)
^
;
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
$ g++ p1042.cpp -std=03 -o p1042g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
from N4910.h:11,
from p1042.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 \
| ^~~~~
p1042.cpp:39:1: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++11-compat]
39 | constexpr D& derived() noexcept { return static_cast<D&>(*this);
| ^~~~~~~~~
p1042.cpp:39:24: warning: identifier 'noexcept' is a keyword in C++11 [-Wc++11-compat]
39 | constexpr D& derived() noexcept { return static_cast<D&>(*this);
| ^~~~~~~~
p1042.cpp:67:13: warning: identifier 'decltype' is a keyword in C++11 [-Wc++11-compat]
67 | constexpr decltype(auto) front() requires forward_range<D>;
| ^~~~~~~~
p1042.cpp:253:6: warning: identifier 'static_assert' is a keyword in C++11 [-Wc++11-compat]
253 | static_assert(same_as<decltype(result1), ranges::dangling>);
| ^~~~~~~~~~~~~
p1042.cpp:18:19: error: 'concept' does not name a type; did you mean 'const'?
18 | template<class R> concept simple-view =
| ^~~~~~~
| const
p1042.cpp:18:19: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1042.cpp:22:19: error: 'concept' does not name a type; did you mean 'const'?
22 | template<class I> concept has-arrow =
| ^~~~~~~
| const
p1042.cpp:22:19: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1042.cpp:25:79: error: expected unqualified-id before ')' token
25 | input_iterator<I> && (is_pointer_v<I> || requires(I i) { i.operator->(); });
| ^
p1042.cpp:27:1: error: 'concept' does not name a type; did you mean 'const'?
27 | concept different-from = // exposition only
| ^~~~~~~
| const
p1042.cpp:27:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1042.cpp:36:10: error: 'requires' does not name a type
36 | requires is_class_v<D> && same_as<D, remove_cv_t<D>>
| ^~~~~~~~
p1042.cpp:36:10: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1042.cpp:81:1: error: 'constexpr' does not name a type
81 | constexpr decltype(auto) front() requires forward_range<D>;
| ^~~~~~~~~
p1042.cpp:81:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:82:1: error: 'constexpr' does not name a type
82 | constexpr decltype(auto) front() const requires forward_range<const D>;
| ^~~~~~~~~
p1042.cpp:82:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:88:1: error: 'concept' does not name a type
88 | concept uses-nonqualification-pointer-conversion = // exposition only is_pointer_v<From> && is_pointer_v<To> && !convertible_to<remove_pointer_t<From>(*)[], remove_pointer_t<To>(*)[]>;
| ^~~~~~~
p1042.cpp:88:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1042.cpp:93:1: error: 'concept' does not name a type
93 | concept pair-like = // exposition only
| ^~~~~~~
p1042.cpp:93:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1042.cpp:102:1: error: 'concept' does not name a type
102 | concept pair-like-convertible-from = // exposition only
| ^~~~~~~
p1042.cpp:102:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1042.cpp:105:1: error: 'constexpr' does not name a type
105 | constexpr decltype(auto) back() requires bidirectional_range<D> && common_range<D>;
| ^~~~~~~~~
p1042.cpp:105:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:106:1: error: 'constexpr' does not name a type
106 | constexpr decltype(auto) back() const
| ^~~~~~~~~
p1042.cpp:106:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:112:10: error: 'input_or_output_iterator' has not been declared
112 | template<input_or_output_iterator I, sentinel_for<I> S = I, subrange_kind K =
| ^~~~~~~~~~~~~~~~~~~~~~~~
p1042.cpp:112:38: error: 'sentinel_for' has not been declared
112 | template<input_or_output_iterator I, sentinel_for<I> S = I, subrange_kind K =
| ^~~~~~~~~~~~
p1042.cpp:112:50: error: expected '>' before '<' token
112 | template<input_or_output_iterator I, sentinel_for<I> S = I, subrange_kind K =
| ^
p1042.cpp:114:12: error: expected constructor, destructor, or type conversion before '(' token
114 | requires (K == subrange_kind::sized || !sized_sentinel_for<S, I>)
| ^
p1042.cpp:154:10: error: 'input_or_output_iterator' has not been declared
154 | template<input_or_output_iterator I, sentinel_for<I> S>
| ^~~~~~~~~~~~~~~~~~~~~~~~
p1042.cpp:154:38: error: 'sentinel_for' has not been declared
154 | template<input_or_output_iterator I, sentinel_for<I> S>
| ^~~~~~~~~~~~
p1042.cpp:154:50: error: expected '>' before '<' token
154 | template<input_or_output_iterator I, sentinel_for<I> S>
| ^
p1042.cpp:155:11: error: expected constructor, destructor, or type conversion before '(' token
155 | subrange(I, S) -> subrange<I, S>;
| ^
p1042.cpp:156:10: error: 'input_or_output_iterator' has not been declared
156 | template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
| ^~~~~~~~~~~~~~~~~~~~~~~~
p1042.cpp:156:38: error: 'sentinel_for' has not been declared
156 | template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
| ^~~~~~~~~~~~
p1042.cpp:156:50: error: expected '>' before '<' token
156 | template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
| ^
p1042.cpp:156:65: error: expected constructor, destructor, or type conversion before '(' token
156 | template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
| ^
p1042.cpp:158:10: error: 'borrowed_range' has not been declared
158 | template<borrowed_range R>
| ^~~~~~~~~~~~~~
p1042.cpp:159:11: error: expected constructor, destructor, or type conversion before '(' token
159 | subrange(R&&) ->
| ^
p1042.cpp:165:1: error: 'constexpr' does not name a type
165 | constexpr subrange(convertible-to-non-slicing<I> auto i, S s, make-unsigned-like-t<iter_difference_t<I>> n)
| ^~~~~~~~~
p1042.cpp:165:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:167:10: error: 'borrowed_range' has not been declared
167 | template<borrowed_range R>
| ^~~~~~~~~~~~~~
p1042.cpp:168:9: error: expected constructor, destructor, or type conversion before '(' token
168 | subrange(R&&, make-unsigned-like-t<range_difference_t<R>>) ->
| ^
p1042.cpp:170:42: error: 'subrange_kind' has not been declared
170 | template<size_t N, class I, class S, subrange_kind K>
| ^~~~~~~~~~~~~
p1042.cpp:171:16: error: expected constructor, destructor, or type conversion before '(' token
171 | requires ((N == 0 && copyable<I>) || N == 1)
| ^
p1042.cpp:173:42: error: 'subrange_kind' has not been declared
173 | template<size_t N, class I, class S, subrange_kind K>
| ^~~~~~~~~~~~~
p1042.cpp:174:16: error: expected constructor, destructor, or type conversion before '(' token
174 | requires (N < 2)
| ^
p1042.cpp:178:19: error: 'get' has not been declared in 'std::ranges'
178 | using ranges::get;
| ^~~
p1042.cpp:181:10: error: expected constructor, destructor, or type conversion before '(' token
181 | requires (K == subrange_kind::sized);
| ^
p1042.cpp:185:10: error: 'different' has not been declared
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^~~~~~~~~
p1042.cpp:185:19: error: expected '>' before '-' token
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^
p1042.cpp:185:38: error: 'requires' does not name a type
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^~~~~~~~
p1042.cpp:185:38: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1042.cpp:191:10: error: 'different' has not been declared
191 | template<different-from<subrange> PairLike>
| ^~~~~~~~~
p1042.cpp:191:19: error: expected '>' before '-' token
191 | template<different-from<subrange> PairLike>
| ^
p1042.cpp:192:1: error: 'requires' does not name a type
192 | requires pair-like-convertible-from<PairLike, const I&, const S&>
| ^~~~~~~~
p1042.cpp:192:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1042.cpp:196:1: error: 'constexpr' does not name a type
196 | constexpr I begin() const requires copyable<I>;
| ^~~~~~~~~
p1042.cpp:196:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:198:1: error: expected unqualified-id before '[' token
198 | [[nodiscard]] constexpr I begin() requires (!copyable<I>);
| ^
p1042.cpp:201:1: error: 'constexpr' does not name a type
201 | constexpr bool empty() const;
| ^~~~~~~~~
p1042.cpp:201:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:203:1: error: 'constexpr' does not name a type
203 | constexpr make-unsigned-like-t<iter_difference_t<I>> size() const
| ^~~~~~~~~
p1042.cpp:203:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:207:3: error: expected unqualified-id before 'else'
207 | else
| ^~~~
p1042.cpp:209:10: error: expected constructor, destructor, or type conversion before '(' token
209 | requires (K == subrange_kind::sized);
| ^
p1042.cpp:212:1: error: expected unqualified-id before '[' token
212 | [[nodiscard]] constexpr subrange next(iter_difference_t<I> n = 1) const &
| ^
p1042.cpp:215:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
215 | auto tmp = *this;
| ^~~~
| ----
p1042.cpp:215:8: error: 'tmp' does not name a type; did you mean 'tm'?
215 | auto tmp = *this;
| ^~~
| tm
p1042.cpp:216:3: error: 'tmp' does not name a type; did you mean 'tm'?
216 | tmp.advance(n);
| ^~~
| tm
p1042.cpp:217:3: error: expected unqualified-id before 'return'
217 | return tmp;
| ^~~~~~
p1042.cpp:218:1: error: expected unqualified-id before '[' token
218 | [[nodiscard]] constexpr subrange next(iter_difference_t<I> n = 1) &&;
| ^
p1042.cpp:220:3: error: expected unqualified-id before 'return'
220 | return std::move(*this);
| ^~~~~~
p1042.cpp:221:1: error: expected unqualified-id before '[' token
221 | [[nodiscard]] constexpr subrange prev(iter_difference_t<I> n = 1) const
| ^
p1042.cpp:224:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
224 | auto tmp = *this;
| ^~~~
| ----
p1042.cpp:224:8: error: 'tmp' does not name a type; did you mean 'tm'?
224 | auto tmp = *this;
| ^~~
| tm
p1042.cpp:225:3: error: 'tmp' does not name a type; did you mean 'tm'?
225 | tmp.advance(-n);
| ^~~
| tm
p1042.cpp:226:3: error: expected unqualified-id before 'return'
226 | return tmp;
| ^~~~~~
p1042.cpp:227:1: error: 'constexpr' does not name a type
227 | constexpr subrange& advance(iter_difference_t<I> n);
| ^~~~~~~~~
p1042.cpp:227:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:229:3: error: expected unqualified-id before 'if'
229 | if constexpr (bidirectional_iterator<I>) {
| ^~
p1042.cpp:234:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
234 | auto d = n - ranges::advance(begin_, n, end_); if constexpr (StoreSize)
| ^~~~
| ----
p1042.cpp:234:6: error: 'd' does not name a type
234 | auto d = n - ranges::advance(begin_, n, end_); if constexpr (StoreSize)
| ^
p1042.cpp:234:48: error: expected unqualified-id before 'if'
234 | auto d = n - ranges::advance(begin_, n, end_); if constexpr (StoreSize)
| ^~
p1042.cpp:235:31: error: expected unqualified-id before 'return'
235 | size_ -= to-unsigned-like(d); return *this;
| ^~~~~~
p1042.cpp:236:38: error: 'subrange_kind' has not been declared
236 | template<size_t N, class I, class S, subrange_kind K>
| ^~~~~~~~~~~~~
p1042.cpp:237:12: error: expected constructor, destructor, or type conversion before '(' token
237 | requires ((N == 0 && copyable<I>) || N == 1)
| ^
p1042.cpp:239:38: error: 'subrange_kind' has not been declared
239 | template<size_t N, class I, class S, subrange_kind K>
| ^~~~~~~~~~~~~
p1042.cpp:240:12: error: expected constructor, destructor, or type conversion before '(' token
240 | requires (N < 2)
| ^
p1042.cpp:246:10: error: 'constexpr' does not name a type
246 | constexpr dangling() noexcept = default;
| ^~~~~~~~~
p1042.cpp:246:10: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:247:10: error: 'constexpr' does not name a type
247 | constexpr dangling(auto&&...) noexcept {}
| ^~~~~~~~~
p1042.cpp:247:10: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:252:6: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
252 | auto result1 = ranges::find(f(), 42);
| ^~~~
| ----
p1042.cpp:252:11: error: 'result1' does not name a type
252 | auto result1 = ranges::find(f(), 42);
| ^~~~~~~
p1042.cpp:253:19: error: expected constructor, destructor, or type conversion before '(' token
253 | static_assert(same_as<decltype(result1), ranges::dangling>);
| ^
p1042.cpp:254:6: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
254 | auto vec = f();
| ^~~~
| ----
p1042.cpp:254:11: error: 'vec' does not name a type
254 | auto vec = f();
| ^~~
p1042.cpp:255:6: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
255 | auto result2 = ranges::find(vec, 42);
| ^~~~
| ----
p1042.cpp:255:11: error: 'result2' does not name a type
255 | auto result2 = ranges::find(vec, 42);
| ^~~~~~~
p1042.cpp:256:19: error: expected constructor, destructor, or type conversion before '(' token
256 | static_assert(same_as<decltype(result2), vector<int>::iterator>);
| ^
p1042.cpp:257:6: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
257 | auto result3 = ranges::find(ranges::subrange{vec}, 42);
| ^~~~
| ----
p1042.cpp:257:11: error: 'result3' does not name a type
257 | auto result3 = ranges::find(ranges::subrange{vec}, 42);
| ^~~~~~~
p1042.cpp:257:55: error: expected unqualified-id before ',' token
257 | auto result3 = ranges::find(ranges::subrange{vec}, 42);
| ^
p1042.cpp:257:57: error: expected unqualified-id before numeric constant
257 | auto result3 = ranges::find(ranges::subrange{vec}, 42);
| ^~
p1042.cpp:258:19: error: expected constructor, destructor, or type conversion before '(' token
258 | static_assert(same_as<decltype(result3), vector<int>::iterator>);
| ^
p1042.cpp:267:1: error: 'string_view' does not name a type
267 | string_view str = "the quick brown fox";
| ^~~~~~~~~~~
p1042.cpp:268:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
268 | auto words = views::split(str, ' ') | to<vector<string>>(); // words is vector<string>{"the", "quick", "brown", "fox"}
| ^~~~
| ----
p1042.cpp:268:6: error: 'words' does not name a type
268 | auto words = views::split(str, ' ') | to<vector<string>>(); // words is vector<string>{"the", "quick", "brown", "fox"}
| ^~~~~
p1042.cpp:271:1: error: 'constexpr' does not name a type
271 | constexpr bool reservable-container = // exposition only
| ^~~~~~~~~
p1042.cpp:271:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:281:38: error: 'constexpr' does not name a type
281 | template<class Container, class Ref> constexpr bool container-insertable = requires(Container& c, Ref&& ref) {
| ^~~~~~~~~
p1042.cpp:281:38: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:293:13: error: expected constructor, destructor, or type conversion before '(' token
293 | C(ranges::begin(r), ranges::end(r), std::forward<Args>(args)...)
| ^
p1042.cpp:298:1: error: expected unqualified-id before 'if'
298 | if constexpr (sized_range<R> && reservable-container<C>)
| ^~
p1042.cpp:300:13: error: expected constructor, destructor, or type conversion before '(' token
300 | ranges::copy(r, container-inserter<range_reference_t<R>>(c));
| ^
p1042.cpp:302:8: error: 'to' does not name a type; did you mean 'tm'?
302 | to<C>(r | views::transform([](auto&& elem) {
| ^~
| tm
p1042.cpp:304:9: error: expected unqualified-id before ')' token
304 | }), std::forward<Args>(args)...);
| ^
p1042.cpp:309:1: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
309 | auto container-inserter (C& c) { // exposition only
| ^~~~
| ----
p1042.cpp:309:6: error: 'container' does not name a type
309 | auto container-inserter (C& c) { // exposition only
| ^~~~~~~~~
p1042.cpp:316:19: error: 'input_range' has not been declared
316 | template<class C, input_range R, class... Args> requires (!view<C>)
| ^~~~~~~~~~~
p1042.cpp:316:39: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
316 | template<class C, input_range R, class... Args> requires (!view<C>)
| ^~~
p1042.cpp:316:58: error: expected constructor, destructor, or type conversion before '(' token
316 | template<class C, input_range R, class... Args> requires (!view<C>)
| ^
p1042.cpp:318:24: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
318 | template<template<class...> class C, input_range R, class... Args>
| ^~~
p1042.cpp:318:38: error: 'input_range' has not been declared
318 | template<template<class...> class C, input_range R, class... Args>
| ^~~~~~~~~~~
p1042.cpp:318:58: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
318 | template<template<class...> class C, input_range R, class... Args>
| ^~~
p1042.cpp:319:3: error: 'constexpr' does not name a type
319 | constexpr auto to(R&& r, Args&&... args);
| ^~~~~~~~~
p1042.cpp:319:3: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1042.cpp:321:13: error: expected unqualified-id before '-' token
321 | struct input-iterator {
| ^
p1042.cpp:338:24: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
338 | template<class C, class... Args> requires (!view<C>)
| ^~~
p1042.cpp:338:43: error: expected constructor, destructor, or type conversion before '(' token
338 | template<class C, class... Args> requires (!view<C>)
| ^
p1042.cpp:340:24: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
340 | template<template<class...> class C, class... Args>
| ^~~
p1042.cpp:340:43: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
340 | template<template<class...> class C, class... Args>
| ^~~
p1042.cpp:341:3: error: 'constexpr' does not name a type
341 | constexpr auto to(Args&&... args);
| ^~~~~~~~~
p1042.cpp:341:3: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
$ g++ p1042.cpp -std=2b -o p1042g -I. -Wall
p1042.cpp:18:33: error: expected '=' before '-' token
18 | template<class R> concept simple-view =
| ^
p1042.cpp:22:30: error: expected '=' before '-' token
22 | template<class I> concept has-arrow =
| ^
p1042.cpp:25:79: error: expected ';' before ')' token
25 | input_iterator<I> && (is_pointer_v<I> || requires(I i) { i.operator->(); });
| ^
| ;
p1042.cpp:27:18: error: expected '=' before '-' token
27 | concept different-from = // exposition only
| ^
p1042.cpp:81:57: error: 'D' was not declared in this scope
81 | constexpr decltype(auto) front() requires forward_range<D>;
| ^
p1042.cpp:81:57: error: 'D' was not declared in this scope
p1042.cpp:81:57: error: 'D' was not declared in this scope
p1042.cpp:81:57: error: 'D' was not declared in this scope
p1042.cpp:81:57: error: 'D' was not declared in this scope
p1042.cpp:81:57: error: 'D' was not declared in this scope
p1042.cpp:81:57: error: 'D' was not declared in this scope
p1042.cpp:81:43: error: 'forward_range' was not declared in this scope; did you mean 'std::ranges::forward_range'?
81 | constexpr decltype(auto) front() requires forward_range<D>;
| ^~~~~~~~~~~~~
| std::ranges::forward_range
In file included from /usr/local/include/c++/12.1.0/string_view:50,
from /usr/local/include/c++/12.1.0/bits/basic_string.h:48,
from /usr/local/include/c++/12.1.0/string:53,
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,
from p1042.cpp:10:
/usr/local/include/c++/12.1.0/bits/ranges_base.h:665:13: note: 'std::ranges::forward_range' declared here
665 | concept forward_range
| ^~~~~~~~~~~~~
p1042.cpp:81:57: error: 'D' was not declared in this scope
81 | constexpr decltype(auto) front() requires forward_range<D>;
| ^
p1042.cpp:81:34: error: expression must be enclosed in parentheses
81 | constexpr decltype(auto) front() requires forward_range<D>;
| ^~~~~~~~
p1042.cpp:81:43: error: expected initializer before 'forward_range'
81 | constexpr decltype(auto) front() requires forward_range<D>;
| ^~~~~~~~~~~~~
p1042.cpp:82:69: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
82 | constexpr decltype(auto) front() const requires forward_range<const D>;
| ^
p1042.cpp:82:69: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1042.cpp:82:69: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1042.cpp:82:69: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1042.cpp:82:69: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1042.cpp:82:69: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1042.cpp:82:69: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1042.cpp:82:49: error: 'forward_range' was not declared in this scope; did you mean 'std::ranges::forward_range'?
82 | constexpr decltype(auto) front() const requires forward_range<const D>;
| ^~~~~~~~~~~~~
| std::ranges::forward_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:665:13: note: 'std::ranges::forward_range' declared here
665 | concept forward_range
| ^~~~~~~~~~~~~
p1042.cpp:82:40: error: expression must be enclosed in parentheses
82 | constexpr decltype(auto) front() const requires forward_range<const D>;
| ^~~~~~~~
p1042.cpp:82:49: error: expected initializer before 'forward_range'
82 | constexpr decltype(auto) front() const requires forward_range<const D>;
| ^~~~~~~~~~~~~
p1042.cpp:88:13: error: expected '=' before '-' token
88 | concept uses-nonqualification-pointer-conversion = // exposition only is_pointer_v<From> && is_pointer_v<To> && !convertible_to<remove_pointer_t<From>(*)[], remove_pointer_t<To>(*)[]>;
| ^
p1042.cpp:93:13: error: expected '=' before '-' token
93 | concept pair-like = // exposition only
| ^
p1042.cpp:102:13: error: expected '=' before '-' token
102 | concept pair-like-convertible-from = // exposition only
| ^
p1042.cpp:105:62: error: 'D' was not declared in this scope
105 | constexpr decltype(auto) back() requires bidirectional_range<D> && common_range<D>;
| ^
p1042.cpp:105:42: error: template argument 1 is invalid
105 | constexpr decltype(auto) back() requires bidirectional_range<D> && common_range<D>;
| ^~~~~~~~~~~~~~~~~~~~~~
p1042.cpp:105:81: error: 'D' was not declared in this scope
105 | constexpr decltype(auto) back() requires bidirectional_range<D> && common_range<D>;
| ^
p1042.cpp:105:68: error: template argument 1 is invalid
105 | constexpr decltype(auto) back() requires bidirectional_range<D> && common_range<D>;
| ^~~~~~~~~~~~~~~
p1042.cpp:105:26: error: constraints on a non-templated function
105 | constexpr decltype(auto) back() requires bidirectional_range<D> && common_range<D>;
| ^~~~
p1042.cpp:107:36: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
107 | requires bidirectional_range<const D> && common_range<const D>;
| ^
p1042.cpp:107:36: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
p1042.cpp:107:37: error: template argument 1 is invalid
107 | requires bidirectional_range<const D> && common_range<const D>;
| ^
p1042.cpp:107:29: error: missing template arguments before '<' token
107 | requires bidirectional_range<const D> && common_range<const D>;
| ^
p1042.cpp:107:29: error: expected initializer before '<' token
p1042.cpp:112:61: error: 'subrange_kind' has not been declared
112 | template<input_or_output_iterator I, sentinel_for<I> S = I, subrange_kind K =
| ^~~~~~~~~~~~~
p1042.cpp:113:32: error: 'subrange_kind' has not been declared
113 | sized_sentinel_for<S, I> ? subrange_kind::sized : subrange_kind::unsized>
| ^~~~~~~~~~~~~
p1042.cpp:113:55: error: 'subrange_kind' has not been declared
113 | sized_sentinel_for<S, I> ? subrange_kind::sized : subrange_kind::unsized>
| ^~~~~~~~~~~~~
p1042.cpp:114:13: error: 'K' was not declared in this scope
114 | requires (K == subrange_kind::sized || !sized_sentinel_for<S, I>)
| ^
p1042.cpp:114:18: error: 'subrange_kind' has not been declared
114 | requires (K == subrange_kind::sized || !sized_sentinel_for<S, I>)
| ^~~~~~~~~~~~~
p1042.cpp:115:55: error: 'K' was not declared in this scope
115 | class subrange : public view_interface<subrange<I, S, K>> {
| ^
p1042.cpp:118:3: error: expected primary-expression before 'begin_'
118 | I begin_ = I();
| ^~~~~~
p1042.cpp:118:1: error: expected ';' at end of member declaration
118 | I begin_ = I();
| ^
| ;
p1042.cpp:118:3: error: 'begin_' does not name a type
118 | I begin_ = I();
| ^~~~~~
p1042.cpp:119:15: error: 'make' does not name a type
119 | S end_ = S(); make-unsigned-like-t<iter_difference_t<I>> size_ = 0;
| ^~~~
p1042.cpp:125:31: error: expected ')' before '-' token
125 | constexpr subrange(convertible-to-non-slicing<I> auto i, S s) requires (!StoreSize);
| ~ ^
| )
p1042.cpp:126:31: error: expected ')' before '-' token
126 | constexpr subrange(convertible-to-non-slicing<I> auto i, S s, make-unsigned-like-t<iter_difference_t<I>> n)
| ~ ^
| )
p1042.cpp:128:10: error: 'different' has not been declared
128 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^~~~~~~~~
p1042.cpp:128:19: error: expected '>' before '-' token
128 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^
p1042.cpp:128:62: error: 'R' was not declared in this scope
128 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^
p1042.cpp:128:47: error: template argument 1 is invalid
128 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^~~~~~~~~~~~~~~~~
p1042.cpp:129:1: error: 'convertible' was not declared in this scope; did you mean 'is_convertible'?
129 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~~
| is_convertible
p1042.cpp:129:13: error: 'to' was not declared in this scope; did you mean 'tm'?
129 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~
| tm
p1042.cpp:129:16: error: 'non' was not declared in this scope; did you mean 'nan'?
129 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~
| nan
p1042.cpp:129:39: error: 'R' was not declared in this scope
129 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:129:40: error: template argument 1 is invalid
129 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:129:20: error: 'slicing' was not declared in this scope
129 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~
p1042.cpp:129:27: error: expression must be enclosed in parentheses
129 | convertible-to-non-slicing<iterator_t<R>, I> &&
p1042.cpp:129:41: error: expected unqualified-id before ',' token
129 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:133:10: error: 'convertible' was not declared in this scope; did you mean 'is_convertible'?
133 | requires convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~~
| is_convertible
p1042.cpp:133:22: error: 'to' was not declared in this scope; did you mean 'tm'?
133 | requires convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~
| tm
p1042.cpp:133:25: error: 'non' was not declared in this scope; did you mean 'nan'?
133 | requires convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~
| nan
p1042.cpp:133:29: error: 'slicing' was not declared in this scope
133 | requires convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~
p1042.cpp:133:1: error: expression must be enclosed in parentheses
133 | requires convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~
p1042.cpp:133:10: error: 'convertible' does not name a type; did you mean 'is_convertible'?
133 | requires convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~~
| is_convertible
p1042.cpp:137:55: error: expected unqualified-id before '{' token
137 | : subrange{ranges::begin(r), ranges::end(r), n} {}
| ^
p1042.cpp:138:10: error: 'different' has not been declared
138 | template<different-from<subrange> PairLike>
| ^~~~~~~~~
p1042.cpp:138:19: error: expected '>' before '-' token
138 | template<different-from<subrange> PairLike>
| ^
p1042.cpp:139:14: error: missing template arguments before '-' token
139 | requires pair-like-convertible-from<PairLike, const I&, const S&>
| ^
p1042.cpp:139:14: error: expected unqualified-id before '-' token
p1042.cpp:145:11: error: 'make' does not name a type
145 | constexpr make-unsigned-like-t<iter_difference_t<I>> size() const
| ^~~~
p1042.cpp:155:34: error: template argument 3 is invalid
155 | subrange(I, S) -> subrange<I, S>;
| ^
p1042.cpp:155:21: error: trailing return type '<type error>' of deduction guide is not a specialization of std::ranges::subrange<I, S, <declaration error> >'
155 | subrange(I, S) -> subrange<I, S>;
| ^~~~~~~~~~~~~~
p1042.cpp:156:72: error: 'make' has not been declared
156 | template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
| ^~~~
p1042.cpp:156:76: error: expected ',' or '...' before '-' token
156 | template<input_or_output_iterator I, sentinel_for<I> S> subrange(I, S, make-unsigned-like-t<iter_difference_t<I>>) ->
| ^
p1042.cpp:157:20: error: 'subrange_kind' was not declared in this scope; did you mean 'subrange'?
157 | subrange<I, S, subrange_kind::sized>;
| ^~~~~~~~~~~~~
| subrange
p1042.cpp:157:40: error: template argument 3 is invalid
157 | subrange<I, S, subrange_kind::sized>;
| ^
p1042.cpp:157:20: error: 'subrange_kind' was not declared in this scope; did you mean 'subrange'?
157 | subrange<I, S, subrange_kind::sized>;
| ^~~~~~~~~~~~~
| subrange
p1042.cpp:157:40: error: template argument 3 is invalid
157 | subrange<I, S, subrange_kind::sized>;
| ^
p1042.cpp:157:20: error: 'subrange_kind' was not declared in this scope; did you mean 'subrange'?
157 | subrange<I, S, subrange_kind::sized>;
| ^~~~~~~~~~~~~
| subrange
p1042.cpp:157:40: error: template argument 3 is invalid
157 | subrange<I, S, subrange_kind::sized>;
| ^
p1042.cpp:157:20: error: 'subrange_kind' was not declared in this scope; did you mean 'subrange'?
157 | subrange<I, S, subrange_kind::sized>;
| ^~~~~~~~~~~~~
| subrange
p1042.cpp:157:40: error: template argument 3 is invalid
157 | subrange<I, S, subrange_kind::sized>;
| ^
p1042.cpp:157:5: error: invalid template-id
157 | subrange<I, S, subrange_kind::sized>;
| ^~~~~~~~
p1042.cpp:157:20: error: 'subrange_kind' has not been declared
157 | subrange<I, S, subrange_kind::sized>;
| ^~~~~~~~~~~~~
p1042.cpp:157:40: error: trailing return type 'subrange<...auto...>' of deduction guide is not a specialization of 'std::ranges::subrange<I, S, <declaration error> >'
157 | subrange<I, S, subrange_kind::sized>;
| ^
p1042.cpp:160:5: error: invalid template-id
160 | subrange<iterator_t<R>, sentinel_t<R>,
| ^~~~~~~~
p1042.cpp:162:1: error: expected '>' before 'constexpr'
162 | constexpr subrange(convertible-to-non-slicing<I> auto i, S s) requires (!StoreSize);
| ^~~~~~~~~
p1042.cpp:162:83: error: trailing return type 'subrange<...auto...>' of deduction guide is not a specialization of 'std::ranges::subrange<I, S, <declaration error> >'
162 | constexpr subrange(convertible-to-non-slicing<I> auto i, S s) requires (!StoreSize);
| ^
p1042.cpp:165:31: error: expected ')' before '-' token
165 | constexpr subrange(convertible-to-non-slicing<I> auto i, S s, make-unsigned-like-t<iter_difference_t<I>> n)
| ~ ^
| )
p1042.cpp:168:15: error: 'make' has not been declared
168 | subrange(R&&, make-unsigned-like-t<range_difference_t<R>>) ->
| ^~~~
p1042.cpp:168:19: error: expected ',' or '...' before '-' token
168 | subrange(R&&, make-unsigned-like-t<range_difference_t<R>>) ->
| ^
p1042.cpp:169:48: error: 'subrange_kind' was not declared in this scope; did you mean 'subrange'?
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^~~~~~~~~~~~~
| subrange
p1042.cpp:169:68: error: template argument 3 is invalid
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^
p1042.cpp:169:48: error: 'subrange_kind' was not declared in this scope; did you mean 'subrange'?
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^~~~~~~~~~~~~
| subrange
p1042.cpp:169:68: error: template argument 3 is invalid
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^
p1042.cpp:169:48: error: 'subrange_kind' was not declared in this scope; did you mean 'subrange'?
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^~~~~~~~~~~~~
| subrange
p1042.cpp:169:68: error: template argument 3 is invalid
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^
p1042.cpp:169:48: error: 'subrange_kind' was not declared in this scope; did you mean 'subrange'?
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^~~~~~~~~~~~~
| subrange
p1042.cpp:169:68: error: template argument 3 is invalid
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^
p1042.cpp:169:9: error: invalid template-id
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^~~~~~~~
p1042.cpp:169:48: error: 'subrange_kind' has not been declared
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^~~~~~~~~~~~~
p1042.cpp:169:68: error: trailing return type 'subrange<...auto...>' of deduction guide is not a specialization of 'std::ranges::subrange<I, S, <declaration error> >'
169 | subrange<iterator_t<R>, sentinel_t<R>, subrange_kind::sized>;
| ^
p1042.cpp:170:42: error: 'subrange_kind' has not been declared
170 | template<size_t N, class I, class S, subrange_kind K>
| ^~~~~~~~~~~~~
p1042.cpp:172:47: error: 'K' was not declared in this scope
172 | constexpr auto get(const subrange<I, S, K>& r);
| ^
p1042.cpp:172:48: error: template argument 3 is invalid
172 | constexpr auto get(const subrange<I, S, K>& r);
| ^
p1042.cpp:173:42: error: 'subrange_kind' has not been declared
173 | template<size_t N, class I, class S, subrange_kind K>
| ^~~~~~~~~~~~~
p1042.cpp:175:41: error: 'K' was not declared in this scope
175 | constexpr auto get(subrange<I, S, K>&& r);
| ^
p1042.cpp:175:42: error: template argument 3 is invalid
175 | constexpr auto get(subrange<I, S, K>&& r);
| ^
p1042.cpp:181:1: error: expected unqualified-id before 'requires'
181 | requires (K == subrange_kind::sized);
| ^~~~~~~~
p1042.cpp:185:10: error: 'different' has not been declared
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^~~~~~~~~
p1042.cpp:185:19: error: expected '>' before '-' token
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^
p1042.cpp:185:62: error: 'R' was not declared in this scope
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:47: error: 'borrowed_range' was not declared in this scope; did you mean 'std::ranges::borrowed_range'?
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^~~~~~~~~~~~~~
| std::ranges::borrowed_range
/usr/local/include/c++/12.1.0/bits/ranges_base.h:591:13: note: 'std::ranges::borrowed_range' declared here
591 | concept borrowed_range
| ^~~~~~~~~~~~~~
p1042.cpp:185:62: error: 'R' was not declared in this scope
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^
p1042.cpp:186:1: error: label 'convertible' referenced outside of any function
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~~
p1042.cpp:186:13: error: 'to' was not declared in this scope; did you mean 'tm'?
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~
| tm
p1042.cpp:186:16: error: 'non' was not declared in this scope; did you mean 'nan'?
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~
| nan
p1042.cpp:186:39: error: 'R' was not declared in this scope
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:28: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1042.cpp:186:39: error: 'R' was not declared in this scope
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:28: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1042.cpp:186:39: error: 'R' was not declared in this scope
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:28: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1042.cpp:186:39: error: 'R' was not declared in this scope
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:28: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1042.cpp:186:39: error: 'R' was not declared in this scope
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:28: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1042.cpp:186:39: error: 'R' was not declared in this scope
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:186:20: error: 'slicing' was not declared in this scope
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~
p1042.cpp:186:39: error: 'R' was not declared in this scope
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:39: error: 'R' was not declared in this scope
p1042.cpp:186:28: error: 'iterator_t' was not declared in this scope; did you mean 'std::ranges::iterator_t'?
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^~~~~~~~~~
| std::ranges::iterator_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:595:11: note: 'std::ranges::iterator_t' declared here
595 | using iterator_t = std::__detail::__range_iter_t<_Tp>;
| ^~~~~~~~~~
p1042.cpp:186:39: error: 'R' was not declared in this scope
186 | convertible-to-non-slicing<iterator_t<R>, I> &&
| ^
p1042.cpp:185:38: error: expression must be enclosed in parentheses
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^~~~~~~~
p1042.cpp:185:62: error: 'R' was not declared in this scope
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:62: error: 'R' was not declared in this scope
p1042.cpp:185:47: error: 'borrowed_range' does not name a type
185 | template<different-from<subrange> R> requires borrowed_range<R> &&
| ^~~~~~~~~~~~~~
p1042.cpp:191:10: error: 'different' has not been declared
191 | template<different-from<subrange> PairLike>
| ^~~~~~~~~
p1042.cpp:191:19: error: expected '>' before '-' token
191 | template<different-from<subrange> PairLike>
| ^
p1042.cpp:192:14: error: missing template arguments before '-' token
192 | requires pair-like-convertible-from<PairLike, const I&, const S&>
| ^
p1042.cpp:192:14: error: expected unqualified-id before '-' token
p1042.cpp:196:11: error: 'I' does not name a type
196 | constexpr I begin() const requires copyable<I>;
| ^
p1042.cpp:198:25: error: 'I' does not name a type
198 | [[nodiscard]] constexpr I begin() requires (!copyable<I>);
| ^
p1042.cpp:201:24: error: non-member function 'constexpr bool empty()' cannot have cv-qualifier
201 | constexpr bool empty() const;
| ^~~~~
p1042.cpp:203:11: error: 'make' does not name a type
203 | constexpr make-unsigned-like-t<iter_difference_t<I>> size() const
| ^~~~
p1042.cpp:207:3: error: expected unqualified-id before 'else'
207 | else
| ^~~~
p1042.cpp:209:1: error: expected unqualified-id before 'requires'
209 | requires (K == subrange_kind::sized);
| ^~~~~~~~
p1042.cpp:212:25: error: 'subrange' does not name a type
212 | [[nodiscard]] constexpr subrange next(iter_difference_t<I> n = 1) const &
| ^~~~~~~~
p1042.cpp:215:15: error: invalid use of 'this' at top level
215 | auto tmp = *this;
| ^~~~
p1042.cpp:216:3: error: 'tmp' does not name a type; did you mean 'tm'?
216 | tmp.advance(n);
| ^~~
| tm
p1042.cpp:217:3: error: expected unqualified-id before 'return'
217 | return tmp;
| ^~~~~~
p1042.cpp:218:25: error: 'subrange' does not name a type
218 | [[nodiscard]] constexpr subrange next(iter_difference_t<I> n = 1) &&;
| ^~~~~~~~
p1042.cpp:220:3: error: expected unqualified-id before 'return'
220 | return std::move(*this);
| ^~~~~~
p1042.cpp:221:25: error: 'subrange' does not name a type
221 | [[nodiscard]] constexpr subrange prev(iter_difference_t<I> n = 1) const
| ^~~~~~~~
p1042.cpp:224:15: error: invalid use of 'this' at top level
224 | auto tmp = *this;
| ^~~~
p1042.cpp:225:3: error: 'tmp' does not name a type; did you mean 'tm'?
225 | tmp.advance(-n);
| ^~~
| tm
p1042.cpp:226:3: error: expected unqualified-id before 'return'
226 | return tmp;
| ^~~~~~
p1042.cpp:227:11: error: 'subrange' does not name a type
227 | constexpr subrange& advance(iter_difference_t<I> n);
| ^~~~~~~~
p1042.cpp:229:3: error: expected unqualified-id before 'if'
229 | if constexpr (bidirectional_iterator<I>) {
| ^~
p1042.cpp:234:10: error: 'n' was not declared in this scope; did you mean 'yn'?
234 | auto d = n - ranges::advance(begin_, n, end_); if constexpr (StoreSize)
| ^
| yn
p1042.cpp:234:30: error: 'begin_' was not declared in this scope
234 | auto d = n - ranges::advance(begin_, n, end_); if constexpr (StoreSize)
| ^~~~~~
p1042.cpp:234:38: error: 'n' was not declared in this scope; did you mean 'yn'?
234 | auto d = n - ranges::advance(begin_, n, end_); if constexpr (StoreSize)
| ^
| yn
p1042.cpp:234:41: error: 'end_' was not declared in this scope
234 | auto d = n - ranges::advance(begin_, n, end_); if constexpr (StoreSize)
| ^~~~
p1042.cpp:234:48: error: expected unqualified-id before 'if'
234 | auto d = n - ranges::advance(begin_, n, end_); if constexpr (StoreSize)
| ^~
p1042.cpp:235:31: error: expected unqualified-id before 'return'
235 | size_ -= to-unsigned-like(d); return *this;
| ^~~~~~
p1042.cpp:236:38: error: 'subrange_kind' has not been declared
236 | template<size_t N, class I, class S, subrange_kind K>
| ^~~~~~~~~~~~~
p1042.cpp:238:43: error: 'K' was not declared in this scope
238 | constexpr auto get(const subrange<I, S, K>& r);
| ^
p1042.cpp:238:43: error: 'K' was not declared in this scope
p1042.cpp:238:43: error: 'K' was not declared in this scope
p1042.cpp:238:43: error: 'K' was not declared in this scope
p1042.cpp:238:43: error: 'K' was not declared in this scope
p1042.cpp:238:43: error: 'K' was not declared in this scope
p1042.cpp:238:28: error: 'subrange' does not name a type
238 | constexpr auto get(const subrange<I, S, K>& r);
| ^~~~~~~~
p1042.cpp:238:36: error: expected ',' or '...' before '<' token
238 | constexpr auto get(const subrange<I, S, K>& r);
| ^
p1042.cpp:239:38: error: 'subrange_kind' has not been declared
239 | template<size_t N, class I, class S, subrange_kind K>
| ^~~~~~~~~~~~~
p1042.cpp:241:37: error: 'K' was not declared in this scope
241 | constexpr auto get(subrange<I, S, K>&& r);
| ^
p1042.cpp:241:37: error: 'K' was not declared in this scope
p1042.cpp:241:37: error: 'K' was not declared in this scope
p1042.cpp:241:37: error: 'K' was not declared in this scope
p1042.cpp:241:22: error: 'template<long unsigned int N, class I, class S, <declaration error> > requires N < 2 constexpr const auto get' conflicts with a previous declaration
241 | constexpr auto get(subrange<I, S, K>&& r);
| ^~~~~~~~
p1042.cpp:238:18: note: previous declaration 'constexpr auto get(int)'
238 | constexpr auto get(const subrange<I, S, K>& r);
| ^~~
p1042.cpp:241:37: error: 'K' was not declared in this scope
241 | constexpr auto get(subrange<I, S, K>&& r);
| ^
p1042.cpp:241:37: error: 'K' was not declared in this scope
p1042.cpp:241:37: error: 'K' was not declared in this scope
p1042.cpp:241:37: error: 'K' was not declared in this scope
p1042.cpp:241:37: error: 'K' was not declared in this scope
p1042.cpp:241:22: error: 'subrange' was not declared in this scope; did you mean 'std::ranges::subrange'?
241 | constexpr auto get(subrange<I, S, K>&& r);
| ^~~~~~~~
| std::ranges::subrange
p1042.cpp:115:7: note: 'std::ranges::subrange' declared here
115 | class subrange : public view_interface<subrange<I, S, K>> {
| ^~~~~~~~
p1042.cpp:241:32: error: expected primary-expression before ',' token
241 | constexpr auto get(subrange<I, S, K>&& r);
| ^
p1042.cpp:241:35: error: expected primary-expression before ',' token
241 | constexpr auto get(subrange<I, S, K>&& r);
| ^
p1042.cpp:241:37: error: 'K' was not declared in this scope
241 | constexpr auto get(subrange<I, S, K>&& r);
| ^
p1042.cpp:241:42: error: label 'r' referenced outside of any function
241 | constexpr auto get(subrange<I, S, K>&& r);
| ^
p1042.cpp:241:43: error: expression list treated as compound expression in initializer [-fpermissive]
241 | constexpr auto get(subrange<I, S, K>&& r);
| ^
p1042.cpp:245:15: error: redefinition of 'struct std::ranges::dangling'
245 | struct dangling {
| ^~~~~~~~
/usr/local/include/c++/12.1.0/bits/ranges_base.h:944:10: note: previous definition of 'struct std::ranges::dangling'
944 | struct dangling
| ^~~~~~~~
p1042.cpp:252:29: error: 'find' is not a member of 'std::ranges'; did you mean 'std::find'?
252 | auto result1 = ranges::find(f(), 42);
| ^~~~
In file included from /usr/local/include/c++/12.1.0/bits/locale_facets.h:48,
from /usr/local/include/c++/12.1.0/bits/basic_ios.h:37,
from /usr/local/include/c++/12.1.0/ios:44:
/usr/local/include/c++/12.1.0/bits/streambuf_iterator.h:434:5: note: 'std::find' declared here
434 | find(istreambuf_iterator<_CharT> __first,
| ^~~~
p1042.cpp:253:20: error: template argument 1 is invalid
253 | static_assert(same_as<decltype(result1), ranges::dangling>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1042.cpp:255:29: error: 'find' is not a member of 'std::ranges'; did you mean 'std::find'?
255 | auto result2 = ranges::find(vec, 42);
| ^~~~
/usr/local/include/c++/12.1.0/bits/streambuf_iterator.h:434:5: note: 'std::find' declared here
434 | find(istreambuf_iterator<_CharT> __first,
| ^~~~
p1042.cpp:256:20: error: template argument 1 is invalid
256 | static_assert(same_as<decltype(result2), vector<int>::iterator>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1042.cpp:257:29: error: 'find' is not a member of 'std::ranges'; did you mean 'std::find'?
257 | auto result3 = ranges::find(ranges::subrange{vec}, 42);
| ^~~~
/usr/local/include/c++/12.1.0/bits/streambuf_iterator.h:434:5: note: 'std::find' declared here
434 | find(istreambuf_iterator<_CharT> __first,
| ^~~~
p1042.cpp:257:54: error: invalid use of placeholder 'subrange<...auto...>'
257 | auto result3 = ranges::find(ranges::subrange{vec}, 42);
| ^
p1042.cpp:258:20: error: template argument 1 is invalid
258 | static_assert(same_as<decltype(result3), vector<int>::iterator>);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1042.cpp:268:14: error: 'views' has not been declared
268 | auto words = views::split(str, ' ') | to<vector<string>>(); // words is vector<string>{"the", "quick", "brown", "fox"}
| ^~~~~
p1042.cpp:268:39: error: 'to' was not declared in this scope; did you mean 'tm'?
268 | auto words = views::split(str, ' ') | to<vector<string>>(); // words is vector<string>{"the", "quick", "brown", "fox"}
| ^~~~~~~~~~~~~~~~~~
| tm
p1042.cpp:271:26: error: expected initializer before '-' token
271 | constexpr bool reservable-container = // exposition only
| ^
p1042.cpp:281:62: error: expected initializer before '-' token
281 | template<class Container, class Ref> constexpr bool container-insertable = requires(Container& c, Ref&& ref) {
| ^
p1042.cpp:293:13: error: expected constructor, destructor, or type conversion before '(' token
293 | C(ranges::begin(r), ranges::end(r), std::forward<Args>(args)...)
| ^
p1042.cpp:298:1: error: expected unqualified-id before 'if'
298 | if constexpr (sized_range<R> && reservable-container<C>)
| ^~
p1042.cpp:300:13: error: expected constructor, destructor, or type conversion before '(' token
300 | ranges::copy(r, container-inserter<range_reference_t<R>>(c));
| ^
p1042.cpp:302:11: error: 'C' was not declared in this scope
302 | to<C>(r | views::transform([](auto&& elem) {
| ^
p1042.cpp:302:8: error: specializing member '::to<<expression error> >' requires 'template<>' syntax
302 | to<C>(r | views::transform([](auto&& elem) {
| ^~~~~
p1042.cpp:304:9: error: expected unqualified-id before ')' token
304 | }), std::forward<Args>(args)...);
| ^
p1042.cpp:309:15: error: expected initializer before '-' token
309 | auto container-inserter (C& c) { // exposition only
| ^
p1042.cpp:316:19: error: 'input_range' has not been declared
316 | template<class C, input_range R, class... Args> requires (!view<C>)
| ^~~~~~~~~~~
p1042.cpp:316:60: error: 'view' was not declared in this scope; did you mean 'std::ranges::view'?
316 | template<class C, input_range R, class... Args> requires (!view<C>)
| ^~~~
| std::ranges::view
/usr/local/include/c++/12.1.0/bits/ranges_base.h:649:13: note: 'std::ranges::view' declared here
649 | concept view
| ^~~~
p1042.cpp:316:66: error: expected primary-expression before '>' token
316 | template<class C, input_range R, class... Args> requires (!view<C>)
| ^
p1042.cpp:316:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
316 | template<class C, input_range R, class... Args> requires (!view<C>)
| ^
p1042.cpp:316:67: error: expected primary-expression before ')' token
316 | template<class C, input_range R, class... Args> requires (!view<C>)
| ^
p1042.cpp:317:16: error: 'R' was not declared in this scope
317 | constexpr C to(R&& r, Args&&... args);
| ^
p1042.cpp:317:20: error: 'r' was not declared in this scope
317 | constexpr C to(R&& r, Args&&... args);
| ^
p1042.cpp:317:27: error: expected primary-expression before '&&' token
317 | constexpr C to(R&& r, Args&&... args);
| ^~
p1042.cpp:318:38: error: 'input_range' has not been declared
318 | template<template<class...> class C, input_range R, class... Args>
| ^~~~~~~~~~~
p1042.cpp:319:21: error: redeclaration of 'template<template<class ...> class C, <declaration error>, class ... Args> constexpr const auto to'
319 | constexpr auto to(R&& r, Args&&... args);
| ^
p1042.cpp:317:13: note: previous declaration 'template<class C, <declaration error>, class ... Args> requires <erroneous-expression> constexpr const C to<C, <expression error>, Args ...>'
317 | constexpr C to(R&& r, Args&&... args);
| ^~
p1042.cpp:319:21: error: 'R' was not declared in this scope
319 | constexpr auto to(R&& r, Args&&... args);
| ^
p1042.cpp:319:25: error: 'r' was not declared in this scope
319 | constexpr auto to(R&& r, Args&&... args);
| ^
p1042.cpp:319:32: error: expected primary-expression before '&&' token
319 | constexpr auto to(R&& r, Args&&... args);
| ^~
p1042.cpp:319:42: error: expression list treated as compound expression in initializer [-fpermissive]
319 | constexpr auto to(R&& r, Args&&... args);
| ^
p1042.cpp:321:13: error: expected unqualified-id before '-' token
321 | struct input-iterator {
| ^
p1042.cpp:338:45: error: 'view' was not declared in this scope; did you mean 'std::ranges::view'?
338 | template<class C, class... Args> requires (!view<C>)
| ^~~~
| std::ranges::view
/usr/local/include/c++/12.1.0/bits/ranges_base.h:649:13: note: 'std::ranges::view' declared here
649 | concept view
| ^~~~
p1042.cpp:338:51: error: expected primary-expression before '>' token
338 | template<class C, class... Args> requires (!view<C>)
| ^
p1042.cpp:338:49: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
338 | template<class C, class... Args> requires (!view<C>)
| ^
p1042.cpp:338:52: error: expected primary-expression before ')' token
338 | template<class C, class... Args> requires (!view<C>)
| ^
p1042.cpp:339:35: error: 'template<class C, class ... Args> requires <erroneous-expression> constexpr auto to(Args&& ...)' conflicts with a previous declaration
339 | constexpr auto to(Args&&... args);
| ^
p1042.cpp:317:13: note: previous declaration 'template<class C, <declaration error>, class ... Args> requires <erroneous-expression> constexpr const C to<C, <expression error>, Args ...>'
317 | constexpr C to(R&& r, Args&&... args);
| ^~
p1042.cpp:341:35: error: 'template<template<class ...> class C, class ... Args> constexpr auto to(Args&& ...)' conflicts with a previous declaration
341 | constexpr auto to(Args&&... args);
| ^
p1042.cpp:317:13: note: previous declaration 'template<class C, <declaration error>, class ... Args> requires <erroneous-expression> constexpr const C to<C, <expression error>, Args ...>'
317 | constexpr C to(R&& r, Args&&... args);
| ^~
検討事項(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 初稿 20220811