LoginSignup
0
0

More than 1 year has passed since last update.

27.11 Specialized <memory> algorithms[specialized.algorithms] C++N4910:2022 (665) p1261.cpp

Last updated at Posted at 2022-08-16

はじめに(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.

27.11 Specialized algorithms[specialized.algorithms]C++N4910:2022 (665) p1261.cpp

算譜(source code)

p1261.cpp
// C++N4910 Committee Draft, Standard for Programming Language C++
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf
const char * n4910 = " 27.11 Specialized <memory> algorithms[specialized.algorithms]C++N4910:2022 (665) p1261.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;

// 27.11.1 General [specialized.algorithms.general]
//  The contents specified in 27.11 are declared in the header <memory> (20.2.2).
//  Unless otherwise specified, if an exception is thrown in the following algorithms, objects constructed by a placement new-expression (7.6.2.8) are destroyed in an unspecified order before allowing the exception to propagate.
//  [Note 1: When invoked on ranges of potentially-overlapping subobjects (6.7.2), the algorithms specified in 27.11 result in undefined behavior.
//  Some algorithms specified in 27.11 make use of the exposition-only function voidify :
template<class T>
constexpr void* voidify(T& obj) noexcept {
    return const_cast<void*>(static_cast<const volatile void*>(addressof(obj)));
}
// 27.11.2 Special memory concepts [special.mem.concepts]
//  Some algorithms in this subclause are constrained with the following exposition-only concepts:
template<class I>
concept nothrow-input-iterator = // exposition only
// [Note 1: This concept allows some input_iterator (25.3.4.9) operations to throw exceptions.
    template<class S, class I>
concept nothrow-sentinel-for = sentinel_for<S, I>; // exposition only
// Types S and I model nothrow-sentinel-for only if no exceptions are thrown from copy construction, move construction, copy assignment, move assignment, or comparisons between valid values of type I and S.
// [Note 2: This concept allows some sentinel_for (25.3.4.7) operations to throw exceptions.
template<class R>
concept nothrow-input-range = // exposition only
    range<R> &&
    nothrow-input-iterator<iterator_t<R>> && nothrow-sentinel-for<sentinel_t<R>, iterator_t<R>>;
// A type R models nothrow-input-range only if no exceptions are thrown from calls to ranges::begin and ranges::end on an object of type R.
template<class I>
concept nothrow-forward-iterator = // exposition only
    nothrow-input-iterator<I> && forward_iterator<I> && nothrow-sentinel-for<I, I>;
// [Note 3: This concept allows some forward_iterator (25.3.4.11) operations to throw exceptions.
template<class R>
concept nothrow-forward-range = // exposition only
    nothrow-input-range<R> && nothrow-forward-iterator <iterator_t<R>>;
// 27.11.3 uninitialized_default_construct [uninitialized.construct.default]
template<class  NoThrowForwardIterator>
void uninitialized_default_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
// Effects: Equivalent to:
for (; first != last; ++first) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type;
namespace ranges {
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
requires default_initializable<iter_value_t<I>>
        I uninitialized_default_construct(I first, S last);
template<nothrow-forward-range R>
requires default_initializable<range_value_t<R>>
        borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
}
// Effects: Equivalent to:
for (; first != last; ++first)
    ::new (voidify(*first)) remove_reference_t<iter_reference_t<I>>;
return first;
// Effects: Equivalent to:
for (; first != last; ++first)
    ::new (voidify(*first)) remove_reference_t<iter_reference_t<I>>();
return first;
template<class NoThrowForwardIterator, class Size>
NoThrowForwardIterator uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
// Effects: Equivalent to:
for (; n > 0; (void)++first, --n) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type;
return first;
namespace ranges {
template<nothrow-forward-iterator I>
requires default_initializable<iter_value_t<I>>
        I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
}
// Effects: Equivalent to:
return uninitialized_default_construct(counted_iterator(first, n),
                                       default_sentinel).base();
// 27.11.4 uninitialized_value_construct [uninitialized.construct.value]
template<class NoThrowForwardIterator>
void uninitialized_value_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
// Effects: Equivalent to:
for (; first != last; ++first) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type();
namespace ranges {
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
requires default_initializable<iter_value_t<I>>
        I uninitialized_value_construct(I first, S last);
template<nothrow-forward-range R>
requires default_initializable<range_value_t<R>>
        borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
}
template<class NoThrowForwardIterator, class Size>
NoThrowForwardIterator uninitialized_value_construct_n(NoThrowForwardIterator first, Size n);
// Effects: Equivalent to:
for (; n > 0; (void)++first, --n) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type();
return first;
namespace ranges {
template<nothrow-forward-iterator I>
requires default_initializable<iter_value_t<I>>
        I uninitialized_value_construct_n(I first, iter_difference_t<I> n);
}
// Effects: Equivalent to:
return uninitialized_value_construct(counted_iterator(first, n),
                                     default_sentinel).base();
// 27.11.5 uninitialized_copy
template<class InputIterator, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
}
uninitialized_copy(IR&& in_range, OR&& out_range);
// Preconditions: [ofirst, olast) does not overlap with [ifirst, ilast). // Effects: Equivalent to:
for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)
::new (voidify(*ofirst)) remove_reference_t<iter_reference_t<O>>(*ifirst);
        return {std::move(ifirst), ofirst};
        NoThrowForwardIterator result);
// Preconditions: result + [0, (last - first)) does not overlap with [first, last). Effects: Equivalent to:
for (; first != last; ++result, (void) ++first) ::new (voidify(*result))
    typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
// Returns: result.
namespace ranges {
template<input_iterator I, sentinel_for<I> S1,
         nothrow-forward-iterator O, nothrow-sentinel-for<O> S2> requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
                 uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast);
template<input_range IR, nothrow-forward-range OR>
requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
        uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
        template<class InputIterator, class Size, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
        NoThrowForwardIterator result);
// Preconditions: result + [0, n) does not overlap with first + [0, n).
// Effects: Equivalent to:
for ( ; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
    typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
// Returns: result.
namespace ranges {
template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
        uninitialized_copy_n_result<I, O>
        uninitialized_copy_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
// [uninitialized.copy]
}
// Preconditions: [ofirst, olast) does not overlap with ifirst + [0, n).
// Effects: Equivalent to:
auto t = uninitialized_copy(counted_iterator(ifirst, n),
                            default_sentinel, ofirst, olast);
return {std::move(t.in).base(), t.out};
}
uninitialized_move(IR&& in_range, OR&& out_range);
// Preconditions: [ofirst, olast) does not overlap with [ifirst, ilast).
// Effects: Equivalent to:
for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) ::new (voidify(*ofirst))
    remove_reference_t<iter_reference_t<O>>(ranges::iter_move(ifirst));
return {std::move(ifirst), ofirst};
// [Note 1: If an exception is thrown, some objects in the range [first,last) are left in a valid, but unspecified state.
// 27.11.6 uninitialized_move [uninitialized.move]
template<class InputIterator, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
        NoThrowForwardIterator result);
// Preconditions: result + [0, (last - first)) does not overlap with [first, last). Effects: Equivalent to:
for (; first != last; (void)++result, ++first) ::new (voidify(*result))
    typename iterator_traits<NoThrowForwardIterator>::value_type(std::move(*first));
return result;
namespace ranges {
template<input_iterator I, sentinel_for<I> S1,
         nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_result<I, O>
        uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast);
template<input_range IR, nothrow-forward-range OR>
requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
        uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
        template<class InputIterator, class Size, class NoThrowForwardIterator>
pair<InputIterator, NoThrowForwardIterator>
uninitialized_move_n(InputIterator first, Size n, NoThrowForwardIterator result);
// Preconditions: result + [0, n) does not overlap with first + [0, n).
// Effects: Equivalent to:
for (; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
    typename iterator_traits<NoThrowForwardIterator>::value_type(std::move(*first));
return {first, result};
namespace ranges {
template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
        uninitialized_move_n_result<I, O>
        uninitialized_move_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
// Preconditions: [ofirst, olast) does not overlap with ifirst + [0, n).
// Effects: Equivalent to:
auto t = uninitialized_move(counted_iterator(ifirst, n),
                            default_sentinel, ofirst, olast);
return {std::move(t.in).base(), t.out};
// [Note 2 : If an exception is thrown, some objects in the range first + [0, n) are left in a valid but unspecified state.
// Effects: Equivalent to:
for (; first != last; ++first)
    ::new (voidify(*first)) remove_reference_t<iter_reference_t<I>>(x);
return first;
// Constraints: The expression ::new (declval<void*>()) T(declval<Args>()...) is well-formed when treated as an unevaluated operand (7.2.3).
// Effects: Equivalent to:
return ::new (voidify(*location)) T(std::forward<Args>(args)...);
// 27.11.7 uninitialized_fill [uninitialized.fill]
template<class NoThrowForwardIterator, class T>
void uninitialized_fill(NoThrowForwardIterator first, NoThrowForwardIterator last, const T& x);
// Effects: Equivalent to:
for (; first != last; ++first) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type(x);
namespace ranges {
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S, class T>
requires constructible_from<iter_value_t<I>, const T&>
I uninitialized_fill(I first, S last, const T& x);
template<nothrow-forward-range R, class T>
requires constructible_from<range_value_t<R>, const T&>
borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x);
}
template<class NoThrowForwardIterator, class Size, class T>
NoThrowForwardIterator uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
// Effects: Equivalent to:
for (; n--; ++first) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type(x);
return first;
namespace ranges {
template<nothrow-forward-iterator I, class T>
requires constructible_from<iter_value_t<I>, const T&>
I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x);
}
// Effects: Equivalent to:
return uninitialized_fill(counted_iterator(first, n), default_sentinel, x).base();
// 27.11.8 construct_at [specialized.construct]
template<class T, class... Args>
constexpr T* construct_at(T* location, Args&&... args);
namespace ranges {
template<class T, class... Args>
constexpr T* construct_at(T* location, Args&&... args);
}
// Effects: — If T is an array type, equivalent to destroy(begin(*location), end(*location)). — Otherwise, equivalent to location->~T().
// Effects: Equivalent to:
for (; first != last; ++first)
    destroy_at(addressof(*first));
return first;
// 27.11.9 destroy [specialized.destroy]
template<class T>
constexpr void destroy_at(T* location);
namespace ranges {
template<destructible T>
constexpr void destroy_at(T* location) noexcept;
}
template<class NoThrowForwardIterator>
constexpr void destroy(NoThrowForwardIterator first, NoThrowForwardIterator last);
// Effects: Equivalent to:
for (; first != last; ++first)
    destroy_at(addressof(*first));
namespace ranges {
template<nothrow-input-iterator I, nothrow-sentinel-for<I> S>
requires destructible<iter_value_t<I>>
                                    constexpr I destroy(I first, S last) noexcept;
template<nothrow-input-range R>
requires destructible<range_value_t<R>>
                                     constexpr borrowed_iterator_t<R> destroy(R&& r) noexcept;
}
template<class NoThrowForwardIterator, class Size>
constexpr NoThrowForwardIterator destroy_n(NoThrowForwardIterator first, Size n);
// Effects: Equivalent to:
for (; n > 0; (void)++first, --n)
    destroy_at(addressof(*first));
return first;
namespace ranges {
template<nothrow-input-iterator I>
requires destructible<iter_value_t<I>>
                                    constexpr I destroy_n(I first, iter_difference_t<I> n) noexcept;
}
// Effects: Equivalent to:
return destroy(counted_iterator(first, n), default_sentinel).base();
int main() {
    cout  <<  n4910 << endl;
    return EXIT_SUCCESS;
}
root@8d37178807ec:/home/n4910# vi p1261.cpp
root@8d37178807ec:/home/n4910# astyle <  p1261.cpp
// C++N4910 Committee Draft, Standard for Programming Language C++
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/n4910.pdf
const char * n4910 = " 27.11 Specialized <memory> algorithms[specialized.algorithms]C++N4910:2022 (665) p1261.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;

// 27.11.1 General [specialized.algorithms.general]
//  The contents specified in 27.11 are declared in the header <memory> (20.2.2).
//  Unless otherwise specified, if an exception is thrown in the following algorithms, objects constructed by a placement new-expression (7.6.2.8) are destroyed in an unspecified order before allowing the exception to propagate.
//  [Note 1: When invoked on ranges of potentially-overlapping subobjects (6.7.2), the algorithms specified in 27.11 result in undefined behavior.
//  Some algorithms specified in 27.11 make use of the exposition-only function voidify :
template<class T>
constexpr void* voidify(T& obj) noexcept {
    return const_cast<void*>(static_cast<const volatile void*>(addressof(obj)));
}
// 27.11.2 Special memory concepts [special.mem.concepts]
//  Some algorithms in this subclause are constrained with the following exposition-only concepts:
template<class I>
concept nothrow-input-iterator = // exposition only
// [Note 1: This concept allows some input_iterator (25.3.4.9) operations to throw exceptions.
    template<class S, class I>
concept nothrow-sentinel-for = sentinel_for<S, I>; // exposition only
// Types S and I model nothrow-sentinel-for only if no exceptions are thrown from copy construction, move construction, copy assignment, move assignment, or comparisons between valid values of type I and S.
// [Note 2: This concept allows some sentinel_for (25.3.4.7) operations to throw exceptions.
template<class R>
concept nothrow-input-range = // exposition only
    range<R> &&
    nothrow-input-iterator<iterator_t<R>> && nothrow-sentinel-for<sentinel_t<R>, iterator_t<R>>;
// A type R models nothrow-input-range only if no exceptions are thrown from calls to ranges::begin and ranges::end on an object of type R.
template<class I>
concept nothrow-forward-iterator = // exposition only
    nothrow-input-iterator<I> && forward_iterator<I> && nothrow-sentinel-for<I, I>;
// [Note 3: This concept allows some forward_iterator (25.3.4.11) operations to throw exceptions.
template<class R>
concept nothrow-forward-range = // exposition only
    nothrow-input-range<R> && nothrow-forward-iterator <iterator_t<R>>;
// 27.11.3 uninitialized_default_construct [uninitialized.construct.default]
template<class  NoThrowForwardIterator>
void uninitialized_default_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
// Effects: Equivalent to:
for (; first != last; ++first) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type;
namespace ranges {
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
requires default_initializable<iter_value_t<I>>
        I uninitialized_default_construct(I first, S last);
template<nothrow-forward-range R>
requires default_initializable<range_value_t<R>>
        borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
}
// Effects: Equivalent to:
for (; first != last; ++first)
    ::new (voidify(*first)) remove_reference_t<iter_reference_t<I>>;
return first;
// Effects: Equivalent to:
for (; first != last; ++first)
    ::new (voidify(*first)) remove_reference_t<iter_reference_t<I>>();
return first;
template<class NoThrowForwardIterator, class Size>
NoThrowForwardIterator uninitialized_default_construct_n(NoThrowForwardIterator first, Size n);
// Effects: Equivalent to:
for (; n > 0; (void)++first, --n) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type;
return first;
namespace ranges {
template<nothrow-forward-iterator I>
requires default_initializable<iter_value_t<I>>
        I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
}
// Effects: Equivalent to:
return uninitialized_default_construct(counted_iterator(first, n),
                                       default_sentinel).base();
// 27.11.4 uninitialized_value_construct [uninitialized.construct.value]
template<class NoThrowForwardIterator>
void uninitialized_value_construct(NoThrowForwardIterator first, NoThrowForwardIterator last);
// Effects: Equivalent to:
for (; first != last; ++first) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type();
namespace ranges {
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
requires default_initializable<iter_value_t<I>>
        I uninitialized_value_construct(I first, S last);
template<nothrow-forward-range R>
requires default_initializable<range_value_t<R>>
        borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
}
template<class NoThrowForwardIterator, class Size>
NoThrowForwardIterator uninitialized_value_construct_n(NoThrowForwardIterator first, Size n);
// Effects: Equivalent to:
for (; n > 0; (void)++first, --n) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type();
return first;
namespace ranges {
template<nothrow-forward-iterator I>
requires default_initializable<iter_value_t<I>>
        I uninitialized_value_construct_n(I first, iter_difference_t<I> n);
}
// Effects: Equivalent to:
return uninitialized_value_construct(counted_iterator(first, n),
                                     default_sentinel).base();
// 27.11.5 uninitialized_copy
template<class InputIterator, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
        uninitialized_copy(IR&& in_range, OR&& out_range);
// Preconditions: [ofirst, olast) does not overlap with [ifirst, ilast). // Effects: Equivalent to:
        for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)
        ::new (voidify(*ofirst)) remove_reference_t<iter_reference_t<O>>(*ifirst);
        return {std::move(ifirst), ofirst};
        NoThrowForwardIterator result);
// Preconditions: result + [0, (last - first)) does not overlap with [first, last). Effects: Equivalent to:
for (; first != last; ++result, (void) ++first) ::new (voidify(*result))
    typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
// Returns: result.
namespace ranges {
template<input_iterator I, sentinel_for<I> S1,
         nothrow-forward-iterator O, nothrow-sentinel-for<O> S2> requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
                 uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast);
template<input_range IR, nothrow-forward-range OR>
requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
        uninitialized_copy_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
        template<class InputIterator, class Size, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_copy_n(InputIterator first, Size n,
        NoThrowForwardIterator result);
}
// Preconditions: result + [0, n) does not overlap with first + [0, n).
// Effects: Equivalent to:
for ( ; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
    typename iterator_traits<NoThrowForwardIterator>::value_type(*first);
// Returns: result.
namespace ranges {
template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
        uninitialized_copy_n_result<I, O>
        uninitialized_copy_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
// [uninitialized.copy]
}
// Preconditions: [ofirst, olast) does not overlap with ifirst + [0, n).
// Effects: Equivalent to:
auto t = uninitialized_copy(counted_iterator(ifirst, n),
                            default_sentinel, ofirst, olast);
return {std::move(t.in).base(), t.out};
uninitialized_move(IR&& in_range, OR&& out_range);
// Preconditions: [ofirst, olast) does not overlap with [ifirst, ilast).
// Effects: Equivalent to:
for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) ::new (voidify(*ofirst))
    remove_reference_t<iter_reference_t<O>>(ranges::iter_move(ifirst));
return {std::move(ifirst), ofirst};
// [Note 1: If an exception is thrown, some objects in the range [first,last) are left in a valid, but unspecified state.
// 27.11.6 uninitialized_move [uninitialized.move]
template<class InputIterator, class NoThrowForwardIterator>
NoThrowForwardIterator uninitialized_move(InputIterator first, InputIterator last,
        NoThrowForwardIterator result);
// Preconditions: result + [0, (last - first)) does not overlap with [first, last). Effects: Equivalent to:
for (; first != last; (void)++result, ++first) ::new (voidify(*result))
    typename iterator_traits<NoThrowForwardIterator>::value_type(std::move(*first));
return result;
namespace ranges {
template<input_iterator I, sentinel_for<I> S1,
         nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_result<I, O>
        uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast);
template<input_range IR, nothrow-forward-range OR>
requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
        uninitialized_move_result<borrowed_iterator_t<IR>, borrowed_iterator_t<OR>>
        template<class InputIterator, class Size, class NoThrowForwardIterator>
pair<InputIterator, NoThrowForwardIterator>
uninitialized_move_n(InputIterator first, Size n, NoThrowForwardIterator result);
}
// Preconditions: result + [0, n) does not overlap with first + [0, n).
// Effects: Equivalent to:
for (; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
    typename iterator_traits<NoThrowForwardIterator>::value_type(std::move(*first));
return {first, result};
namespace ranges {
template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
        uninitialized_move_n_result<I, O>
        uninitialized_move_n(I ifirst, iter_difference_t<I> n, O ofirst, S olast);
// Preconditions: [ofirst, olast) does not overlap with ifirst + [0, n).
// Effects: Equivalent to:
auto t = uninitialized_move(counted_iterator(ifirst, n),
                            default_sentinel, ofirst, olast);
return {std::move(t.in).base(), t.out};
// [Note 2 : If an exception is thrown, some objects in the range first + [0, n) are left in a valid but unspecified state.
// Effects: Equivalent to:
for (; first != last; ++first)
    ::new (voidify(*first)) remove_reference_t<iter_reference_t<I>>(x);
return first;
// Constraints: The expression ::new (declval<void*>()) T(declval<Args>()...) is well-formed when treated as an unevaluated operand (7.2.3).
// Effects: Equivalent to:
return ::new (voidify(*location)) T(std::forward<Args>(args)...);
// 27.11.7 uninitialized_fill [uninitialized.fill]
template<class NoThrowForwardIterator, class T>
void uninitialized_fill(NoThrowForwardIterator first, NoThrowForwardIterator last, const T& x);
// Effects: Equivalent to:
for (; first != last; ++first) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type(x);
namespace ranges {
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S, class T>
requires constructible_from<iter_value_t<I>, const T&>
I uninitialized_fill(I first, S last, const T& x);
template<nothrow-forward-range R, class T>
requires constructible_from<range_value_t<R>, const T&>
borrowed_iterator_t<R> uninitialized_fill(R&& r, const T& x);
}
template<class NoThrowForwardIterator, class Size, class T>
NoThrowForwardIterator uninitialized_fill_n(NoThrowForwardIterator first, Size n, const T& x);
// Effects: Equivalent to:
for (; n--; ++first) ::new (voidify(*first))
    typename iterator_traits<NoThrowForwardIterator>::value_type(x);
return first;
namespace ranges {
template<nothrow-forward-iterator I, class T>
requires constructible_from<iter_value_t<I>, const T&>
I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x);
}
// Effects: Equivalent to:
return uninitialized_fill(counted_iterator(first, n), default_sentinel, x).base();
// 27.11.8 construct_at [specialized.construct]
template<class T, class... Args>
constexpr T* construct_at(T* location, Args&&... args);
namespace ranges {
template<class T, class... Args>
constexpr T* construct_at(T* location, Args&&... args);
}
// Effects: — If T is an array type, equivalent to destroy(begin(*location), end(*location)). — Otherwise, equivalent to location->~T().
// Effects: Equivalent to:
for (; first != last; ++first)
    destroy_at(addressof(*first));
return first;
// 27.11.9 destroy [specialized.destroy]
template<class T>
constexpr void destroy_at(T* location);
namespace ranges {
template<destructible T>
constexpr void destroy_at(T* location) noexcept;
}
template<class NoThrowForwardIterator>
constexpr void destroy(NoThrowForwardIterator first, NoThrowForwardIterator last);
// Effects: Equivalent to:
for (; first != last; ++first)
    destroy_at(addressof(*first));
namespace ranges {
template<nothrow-input-iterator I, nothrow-sentinel-for<I> S>
requires destructible<iter_value_t<I>>
                                    constexpr I destroy(I first, S last) noexcept;
template<nothrow-input-range R>
requires destructible<range_value_t<R>>
                                     constexpr borrowed_iterator_t<R> destroy(R&& r) noexcept;
}
template<class NoThrowForwardIterator, class Size>
constexpr NoThrowForwardIterator destroy_n(NoThrowForwardIterator first, Size n);
// Effects: Equivalent to:
for (; n > 0; (void)++first, --n)
    destroy_at(addressof(*first));
return first;
namespace ranges {
template<nothrow-input-iterator I>
requires destructible<iter_value_t<I>>
                                    constexpr I destroy_n(I first, iter_difference_t<I> n) noexcept;
}
// Effects: Equivalent to:
return destroy(counted_iterator(first, n), default_sentinel).base();
int main() {
    cout  <<  n4910 << endl;
    return EXIT_SUCCESS;
}

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

bash
$ clang++ p1261.cpp -std=03 -o p1261l -I. -Wall
In file included from p1261.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 \
 ^
p1261.cpp:20:1: error: unknown type name 'constexpr'
constexpr void* voidify(T& obj) noexcept {
^
p1261.cpp:20:32: error: expected ';' at end of declaration
constexpr void* voidify(T& obj) noexcept {
                               ^
                               ;
p1261.cpp:20:33: error: C++ requires a type specifier for all declarations
constexpr void* voidify(T& obj) noexcept {
                                ^
p1261.cpp:20:41: error: expected ';' after top level declarator
constexpr void* voidify(T& obj) noexcept {
                                        ^
                                        ;
p1261.cpp:33:1: error: unknown type name 'concept'
concept nothrow-input-range = // exposition only
^
p1261.cpp:33:9: warning: variable templates are a C++14 extension [-Wc++14-extensions]
concept nothrow-input-range = // exposition only
        ^
p1261.cpp:33:16: error: expected ';' at end of declaration
concept nothrow-input-range = // exposition only
               ^
               ;
p1261.cpp:33:16: error: expected external declaration
p1261.cpp:33:17: error: unknown type name 'input'
concept nothrow-input-range = // exposition only
                ^
p1261.cpp:33:22: error: expected unqualified-id
concept nothrow-input-range = // exposition only
                     ^
p1261.cpp:38:1: error: unknown type name 'concept'
concept nothrow-forward-iterator = // exposition only
^
p1261.cpp:38:9: warning: variable templates are a C++14 extension [-Wc++14-extensions]
concept nothrow-forward-iterator = // exposition only
        ^
p1261.cpp:38:16: error: expected ';' at end of declaration
concept nothrow-forward-iterator = // exposition only
               ^
               ;
p1261.cpp:38:16: error: expected external declaration
p1261.cpp:38:17: error: unknown type name 'forward'
concept nothrow-forward-iterator = // exposition only
                ^
p1261.cpp:38:24: error: expected unqualified-id
concept nothrow-forward-iterator = // exposition only
                       ^
p1261.cpp:42:1: error: unknown type name 'concept'
concept nothrow-forward-range = // exposition only
^
p1261.cpp:42:9: warning: variable templates are a C++14 extension [-Wc++14-extensions]
concept nothrow-forward-range = // exposition only
        ^
p1261.cpp:42:16: error: expected ';' at end of declaration
concept nothrow-forward-range = // exposition only
               ^
               ;
p1261.cpp:42:16: error: expected external declaration
p1261.cpp:42:17: error: unknown type name 'forward'
concept nothrow-forward-range = // exposition only
                ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.
$ clang++ p1261.cpp -std=2b -o p1261l -I. -Wall
p1261.cpp:26:16: error: expected '='
concept nothrow-input-iterator = // exposition only
               ^
p1261.cpp:33:16: error: expected '='
concept nothrow-input-range = // exposition only
               ^
p1261.cpp:38:16: error: expected '='
concept nothrow-forward-iterator = // exposition only
               ^
p1261.cpp:42:16: error: expected '='
concept nothrow-forward-range = // exposition only
               ^
p1261.cpp:48:1: error: expected unqualified-id
for (; first != last; ++first) ::new (voidify(*first))
^
p1261.cpp:51:10: error: unknown type name 'nothrow'; did you mean 'nothrow_t'?
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
         ^~~~~~~
         nothrow_t
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:92:10: note: 'nothrow_t' declared here
  struct nothrow_t
         ^
p1261.cpp:51:17: error: expected ',' or '>' in template-parameter-list
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
                ^
p1261.cpp:51:36: error: expected unqualified-id
template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
                                   ^
p1261.cpp:54:10: error: unknown type name 'nothrow'; did you mean 'nothrow_t'?
template<nothrow-forward-range R>
         ^~~~~~~
         nothrow_t
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:92:10: note: 'nothrow_t' declared here
  struct nothrow_t
         ^
p1261.cpp:54:17: error: expected ',' or '>' in template-parameter-list
template<nothrow-forward-range R>
                ^
p1261.cpp:55:50: error: use of undeclared identifier 'R'
    requires default_initializable<range_value_t<R>>
                                                 ^
p1261.cpp:59:1: error: expected unqualified-id
for (; first != last; ++first)
^
p1261.cpp:61:8: error: expected unqualified-id
       return first;
       ^
p1261.cpp:63:1: error: expected unqualified-id
for (; first != last; ++first)
^
p1261.cpp:65:3: error: expected unqualified-id
  return first;
  ^
p1261.cpp:69:1: error: expected unqualified-id
for (; n > 0; (void)++first, --n) ::new (voidify(*first))
^
p1261.cpp:71:3: error: expected unqualified-id
  return first;
  ^
p1261.cpp:72:29: error: unknown type name 'nothrow'; did you mean 'nothrow_t'?
namespace ranges { template<nothrow-forward-iterator I>
                            ^~~~~~~
                            nothrow_t
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/new:92:10: note: 'nothrow_t' declared here
  struct nothrow_t
         ^
p1261.cpp:72:36: error: expected ',' or '>' in template-parameter-list
namespace ranges { template<nothrow-forward-iterator I>
                                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

$ g++ p1261.cpp -std=03 -o p1261g -I. -Wall
In file included from /usr/local/include/c++/12.1.0/atomic:38,
                 from N4910.h:11,
                 from p1261.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 \
      |  ^~~~~
p1261.cpp:20:1: warning: identifier 'constexpr' is a keyword in C++11 [-Wc++11-compat]
   20 | constexpr void* voidify(T& obj) noexcept {
      | ^~~~~~~~~
p1261.cpp:20:33: warning: identifier 'noexcept' is a keyword in C++11 [-Wc++11-compat]
   20 | constexpr void* voidify(T& obj) noexcept {
      |                                 ^~~~~~~~
p1261.cpp:20:1: error: 'constexpr' does not name a type
   20 | constexpr void* voidify(T& obj) noexcept {
      | ^~~~~~~~~
p1261.cpp:20:1: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1261.cpp:26:1: error: 'concept' does not name a type; did you mean 'const'?
   26 | concept nothrow-input-iterator = // exposition only
      | ^~~~~~~
      | const
p1261.cpp:26:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:33:1: error: 'concept' does not name a type; did you mean 'const'?
   33 | concept nothrow-input-range = // exposition only
      | ^~~~~~~
      | const
p1261.cpp:33:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:38:1: error: 'concept' does not name a type; did you mean 'const'?
   38 | concept nothrow-forward-iterator = // exposition only
      | ^~~~~~~
      | const
p1261.cpp:38:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:42:1: error: 'concept' does not name a type; did you mean 'const'?
   42 | concept nothrow-forward-range = // exposition only
      | ^~~~~~~
      | const
p1261.cpp:42:1: note: 'concept' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:48:1: error: expected unqualified-id before 'for'
   48 | for (; first != last; ++first) ::new (voidify(*first))
      | ^~~
p1261.cpp:48:8: error: 'first' does not name a type
   48 | for (; first != last; ++first) ::new (voidify(*first))
      |        ^~~~~
p1261.cpp:48:23: error: expected unqualified-id before '++' token
   48 | for (; first != last; ++first) ::new (voidify(*first))
      |                       ^~
p1261.cpp:51:10: error: 'nothrow' is not a type
   51 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
      |          ^~~~~~~
p1261.cpp:51:17: error: expected '>' before '-' token
   51 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
      |                 ^
p1261.cpp:52:5: error: 'requires' does not name a type
   52 |     requires default_initializable<iter_value_t<I>>
      |     ^~~~~~~~
p1261.cpp:52:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:54:10: error: 'nothrow' is not a type
   54 | template<nothrow-forward-range R>
      |          ^~~~~~~
p1261.cpp:54:17: error: expected '>' before '-' token
   54 | template<nothrow-forward-range R>
      |                 ^
p1261.cpp:55:5: error: 'requires' does not name a type
   55 |     requires default_initializable<range_value_t<R>>
      |     ^~~~~~~~
p1261.cpp:55:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:59:1: error: expected unqualified-id before 'for'
   59 | for (; first != last; ++first)
      | ^~~
p1261.cpp:59:8: error: 'first' does not name a type
   59 | for (; first != last; ++first)
      |        ^~~~~
p1261.cpp:59:23: error: expected unqualified-id before '++' token
   59 | for (; first != last; ++first)
      |                       ^~
p1261.cpp:61:8: error: expected unqualified-id before 'return'
   61 |        return first;
      |        ^~~~~~
p1261.cpp:63:1: error: expected unqualified-id before 'for'
   63 | for (; first != last; ++first)
      | ^~~
p1261.cpp:63:8: error: 'first' does not name a type
   63 | for (; first != last; ++first)
      |        ^~~~~
p1261.cpp:63:23: error: expected unqualified-id before '++' token
   63 | for (; first != last; ++first)
      |                       ^~
p1261.cpp:65:3: error: expected unqualified-id before 'return'
   65 |   return first;
      |   ^~~~~~
p1261.cpp:69:1: error: expected unqualified-id before 'for'
   69 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      | ^~~
p1261.cpp:69:8: error: 'n' does not name a type
   69 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |        ^
p1261.cpp:69:16: error: expected unqualified-id before 'void'
   69 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |                ^~~~
p1261.cpp:69:16: error: expected ')' before 'void'
   69 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |               ~^~~~
      |                )
p1261.cpp:71:3: error: expected unqualified-id before 'return'
   71 |   return first;
      |   ^~~~~~
p1261.cpp:72:29: error: 'nothrow' is not a type
   72 | namespace ranges { template<nothrow-forward-iterator I>
      |                             ^~~~~~~
p1261.cpp:72:36: error: expected '>' before '-' token
   72 | namespace ranges { template<nothrow-forward-iterator I>
      |                                    ^
p1261.cpp:73:5: error: 'requires' does not name a type
   73 |     requires default_initializable<iter_value_t<I>>
      |     ^~~~~~~~
p1261.cpp:73:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:77:1: error: expected unqualified-id before 'return'
   77 | return uninitialized_default_construct(counted_iterator(first, n),
      | ^~~~~~
p1261.cpp:83:1: error: expected unqualified-id before 'for'
   83 | for (; first != last; ++first) ::new (voidify(*first))
      | ^~~
p1261.cpp:83:8: error: 'first' does not name a type
   83 | for (; first != last; ++first) ::new (voidify(*first))
      |        ^~~~~
p1261.cpp:83:23: error: expected unqualified-id before '++' token
   83 | for (; first != last; ++first) ::new (voidify(*first))
      |                       ^~
p1261.cpp:86:10: error: 'nothrow' is not a type
   86 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
      |          ^~~~~~~
p1261.cpp:86:17: error: expected '>' before '-' token
   86 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
      |                 ^
p1261.cpp:87:5: error: 'requires' does not name a type
   87 |     requires default_initializable<iter_value_t<I>>
      |     ^~~~~~~~
p1261.cpp:87:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:88:60: error: 'nothrow' is not a type
   88 | I uninitialized_value_construct(I first, S last); template<nothrow-forward-range R>
      |                                                            ^~~~~~~
p1261.cpp:88:67: error: expected '>' before '-' token
   88 | I uninitialized_value_construct(I first, S last); template<nothrow-forward-range R>
      |                                                                   ^
p1261.cpp:89:5: error: 'requires' does not name a type
   89 |     requires default_initializable<range_value_t<R>>
      |     ^~~~~~~~
p1261.cpp:89:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:95:1: error: expected unqualified-id before 'for'
   95 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      | ^~~
p1261.cpp:95:8: error: 'n' does not name a type
   95 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |        ^
p1261.cpp:95:16: error: expected unqualified-id before 'void'
   95 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |                ^~~~
p1261.cpp:95:16: error: expected ')' before 'void'
   95 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |               ~^~~~
      |                )
p1261.cpp:97:8: error: expected unqualified-id before 'return'
   97 |        return first;
      |        ^~~~~~
p1261.cpp:98:29: error: 'nothrow' is not a type
   98 | namespace ranges { template<nothrow-forward-iterator I>
      |                             ^~~~~~~
p1261.cpp:98:36: error: expected '>' before '-' token
   98 | namespace ranges { template<nothrow-forward-iterator I>
      |                                    ^
p1261.cpp:99:5: error: 'requires' does not name a type
   99 |     requires default_initializable<iter_value_t<I>>
      |     ^~~~~~~~
p1261.cpp:99:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:103:1: error: expected unqualified-id before 'return'
  103 | return uninitialized_value_construct(counted_iterator(first, n),
      | ^~~~~~
p1261.cpp:108:2: error: 'uninitialized_copy' is not a type
  108 |  uninitialized_copy(IR&& in_range, OR&& out_range);
      |  ^~~~~~~~~~~~~~~~~~
p1261.cpp:108:23: error: expected ')' before '&&' token
  108 |  uninitialized_copy(IR&& in_range, OR&& out_range);
      |                    ~  ^~
      |                       )
p1261.cpp:108:23: error: expected ')' before '&&' token
  108 |  uninitialized_copy(IR&& in_range, OR&& out_range);
      |                       ^~
      |                       )
p1261.cpp:107:44: note: to match this '('
  107 |   NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
      |                                            ^
p1261.cpp:108:26: error: expected initializer before 'in_range'
  108 |  uninitialized_copy(IR&& in_range, OR&& out_range);
      |                          ^~~~~~~~
p1261.cpp:110:1: error: expected unqualified-id before 'for'
  110 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)
      | ^~~
p1261.cpp:110:8: error: 'ifirst' does not name a type
  110 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)
      |        ^~~~~~
p1261.cpp:110:44: error: expected unqualified-id before '++' token
  110 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)
      |                                            ^~
p1261.cpp:112:3: error: expected unqualified-id before 'return'
  112 |   return {std::move(ifirst), ofirst};
      |   ^~~~~~
p1261.cpp:113:40: error: 'NoThrowForwardIterator' does not name a type
  113 |                                        NoThrowForwardIterator result);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:115:1: error: expected unqualified-id before 'for'
  115 | for (; first != last; ++result, (void) ++first) ::new (voidify(*result))
      | ^~~
p1261.cpp:115:8: error: 'first' does not name a type
  115 | for (; first != last; ++result, (void) ++first) ::new (voidify(*result))
      |        ^~~~~
p1261.cpp:115:23: error: expected unqualified-id before '++' token
  115 | for (; first != last; ++result, (void) ++first) ::new (voidify(*result))
      |                       ^~
p1261.cpp:119:12: error: 'input_iterator' has not been declared
  119 |   template<input_iterator I, sentinel_for<I> S1,
      |            ^~~~~~~~~~~~~~
p1261.cpp:119:30: error: 'sentinel_for' has not been declared
  119 |   template<input_iterator I, sentinel_for<I> S1,
      |                              ^~~~~~~~~~~~
p1261.cpp:119:42: error: expected '>' before '<' token
  119 |   template<input_iterator I, sentinel_for<I> S1,
      |                                          ^
p1261.cpp:120:57: error: 'requires' does not name a type
  120 | nothrow-forward-iterator O, nothrow-sentinel-for<O> S2> requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
      |                                                         ^~~~~~~~
p1261.cpp:120:57: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:121:70: error: 'input_range' has not been declared
  121 | uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                      ^~~~~~~~~~~
p1261.cpp:121:86: error: 'nothrow' is not a type
  121 | uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                                      ^~~~~~~
p1261.cpp:121:93: error: expected '>' before '-' token
  121 | itialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                                         ^

p1261.cpp:122:5: error: 'requires' does not name a type
  122 |     requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
      |     ^~~~~~~~
p1261.cpp:122:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:130:1: error: expected unqualified-id before 'for'
  130 | for ( ; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      | ^~~
p1261.cpp:130:9: error: 'n' does not name a type
  130 | for ( ; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      |         ^
p1261.cpp:130:16: error: expected unqualified-id before '++' token
  130 | for ( ; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      |                ^~
p1261.cpp:134:10: error: 'input_iterator' has not been declared
  134 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |          ^~~~~~~~~~~~~~
p1261.cpp:134:28: error: 'nothrow' is not a type
  134 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |                            ^~~~~~~
p1261.cpp:134:35: error: expected '>' before '-' token
  134 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |                                   ^
p1261.cpp:135:5: error: 'requires' does not name a type
  135 |     requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
      |     ^~~~~~~~
p1261.cpp:135:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:142:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
  142 |   auto t = uninitialized_copy(counted_iterator(ifirst, n),
      |   ^~~~
      |   ----
p1261.cpp:142:8: error: 't' does not name a type; did you mean 'tm'?
  142 |   auto t = uninitialized_copy(counted_iterator(ifirst, n),
      |        ^
      |        tm
p1261.cpp:144:3: error: expected unqualified-id before 'return'
  144 |   return {std::move(t.in).base(), t.out};
      |   ^~~~~~
p1261.cpp:145:20: error: expected constructor, destructor, or type conversion before '(' token
  145 |  uninitialized_move(IR&& in_range, OR&& out_range);
      |                    ^
p1261.cpp:148:1: error: expected unqualified-id before 'for'
  148 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) ::new (voidify(*ofirst))
      | ^~~
p1261.cpp:148:8: error: 'ifirst' does not name a type
  148 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) ::new (voidify(*ofirst))
      |        ^~~~~~
p1261.cpp:148:44: error: expected unqualified-id before '++' token
  148 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) ::new (voidify(*ofirst))
      |                                            ^~
p1261.cpp:150:3: error: expected unqualified-id before 'return'
  150 |   return {std::move(ifirst), ofirst};
      |   ^~~~~~
p1261.cpp:157:1: error: expected unqualified-id before 'for'
  157 | for (; first != last; (void)++result, ++first) ::new (voidify(*result))
      | ^~~
p1261.cpp:157:8: error: 'first' does not name a type
  157 | for (; first != last; (void)++result, ++first) ::new (voidify(*result))
      |        ^~~~~
p1261.cpp:157:24: error: expected unqualified-id before 'void'
  157 | for (; first != last; (void)++result, ++first) ::new (voidify(*result))
      |                        ^~~~
p1261.cpp:157:24: error: expected ')' before 'void'
  157 | for (; first != last; (void)++result, ++first) ::new (voidify(*result))
      |                       ~^~~~
      |                        )
p1261.cpp:159:3: error: expected unqualified-id before 'return'
  159 |   return result;
      |   ^~~~~~
p1261.cpp:161:12: error: 'input_iterator' has not been declared
  161 |   template<input_iterator I, sentinel_for<I> S1,
      |            ^~~~~~~~~~~~~~
p1261.cpp:161:30: error: 'sentinel_for' has not been declared
  161 |   template<input_iterator I, sentinel_for<I> S1,
      |                              ^~~~~~~~~~~~
p1261.cpp:161:42: error: expected '>' before '<' token
  161 |   template<input_iterator I, sentinel_for<I> S1,
      |                                          ^
p1261.cpp:163:1: error: 'requires' does not name a type
  163 | requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_result<I, O>
      | ^~~~~~~~
p1261.cpp:163:1: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:164:70: error: 'input_range' has not been declared
  164 | uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                      ^~~~~~~~~~~
p1261.cpp:164:86: error: 'nothrow' is not a type
  164 | uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                                      ^~~~~~~
p1261.cpp:164:93: error: expected '>' before '-' token
  164 | itialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                                         ^

p1261.cpp:165:5: error: 'requires' does not name a type
  165 |     requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
      |     ^~~~~~~~
p1261.cpp:165:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:173:1: error: expected unqualified-id before 'for'
  173 | for (; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      | ^~~
p1261.cpp:173:8: error: 'n' does not name a type
  173 | for (; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      |        ^
p1261.cpp:173:15: error: expected unqualified-id before '++' token
  173 | for (; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      |               ^~
p1261.cpp:175:4: error: expected unqualified-id before 'return'
  175 |    return {first, result};
      |    ^~~~~~
p1261.cpp:177:10: error: 'input_iterator' has not been declared
  177 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |          ^~~~~~~~~~~~~~
p1261.cpp:177:28: error: 'nothrow' is not a type
  177 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |                            ^~~~~~~
p1261.cpp:177:35: error: expected '>' before '-' token
  177 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |                                   ^
p1261.cpp:178:5: error: 'requires' does not name a type
  178 |     requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
      |     ^~~~~~~~
p1261.cpp:178:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:183:3: warning: 'auto' changes meaning in C++11; please remove it [-Wc++11-compat]
  183 |   auto t = uninitialized_move(counted_iterator(ifirst, n),
      |   ^~~~
      |   ----
p1261.cpp:183:8: error: 't' does not name a type; did you mean 'tm'?
  183 |   auto t = uninitialized_move(counted_iterator(ifirst, n),
      |        ^
      |        tm
p1261.cpp:185:1: error: expected unqualified-id before 'return'
  185 | return {std::move(t.in).base(), t.out};
      | ^~~~~~
p1261.cpp:188:1: error: expected unqualified-id before 'for'
  188 | for (; first != last; ++first)
      | ^~~
p1261.cpp:188:8: error: 'first' does not name a type
  188 | for (; first != last; ++first)
      |        ^~~~~
p1261.cpp:188:23: error: expected unqualified-id before '++' token
  188 | for (; first != last; ++first)
      |                       ^~
p1261.cpp:190:3: error: expected unqualified-id before 'return'
  190 |   return first;
      |   ^~~~~~
p1261.cpp:193:1: error: expected unqualified-id before 'return'
  193 | return ::new (voidify(*location)) T(std::forward<Args>(args)...);
      | ^~~~~~
p1261.cpp:198:1: error: expected unqualified-id before 'for'
  198 | for (; first != last; ++first) ::new (voidify(*first))
      | ^~~
p1261.cpp:198:8: error: 'first' does not name a type
  198 | for (; first != last; ++first) ::new (voidify(*first))
      |        ^~~~~
p1261.cpp:198:23: error: expected unqualified-id before '++' token
  198 | for (; first != last; ++first) ::new (voidify(*first))
      |                       ^~
p1261.cpp:201:10: error: 'nothrow' is not a type
  201 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S, class T>
      |          ^~~~~~~
p1261.cpp:201:17: error: expected '>' before '-' token
  201 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S, class T>
      |                 ^
p1261.cpp:202:5: error: 'requires' does not name a type
  202 |     requires constructible_from<iter_value_t<I>, const T&>
      |     ^~~~~~~~
p1261.cpp:202:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:203:61: error: 'nothrow' is not a type
  203 | I uninitialized_fill(I first, S last, const T& x); template<nothrow-forward-range R, class T>
      |                                                             ^~~~~~~
p1261.cpp:203:68: error: expected '>' before '-' token
  203 | I uninitialized_fill(I first, S last, const T& x); template<nothrow-forward-range R, class T>
      |                                                                    ^
p1261.cpp:204:5: error: 'requires' does not name a type
  204 |     requires constructible_from<range_value_t<R>, const T&>
      |     ^~~~~~~~
p1261.cpp:204:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:210:1: error: expected unqualified-id before 'for'
  210 | for (; n--; ++first) ::new (voidify(*first))
      | ^~~
p1261.cpp:210:8: error: 'n' does not name a type
  210 | for (; n--; ++first) ::new (voidify(*first))
      |        ^
p1261.cpp:210:13: error: expected unqualified-id before '++' token
  210 | for (; n--; ++first) ::new (voidify(*first))
      |             ^~
p1261.cpp:212:3: error: expected unqualified-id before 'return'
  212 |   return first;
      |   ^~~~~~
p1261.cpp:213:29: error: 'nothrow' is not a type
  213 | namespace ranges { template<nothrow-forward-iterator I, class T>
      |                             ^~~~~~~
p1261.cpp:213:36: error: expected '>' before '-' token
  213 | namespace ranges { template<nothrow-forward-iterator I, class T>
      |                                    ^
p1261.cpp:214:5: error: 'requires' does not name a type
  214 |     requires constructible_from<iter_value_t<I>, const T&>
      |     ^~~~~~~~
p1261.cpp:214:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:218:1: error: expected unqualified-id before 'return'
  218 | return uninitialized_fill(counted_iterator(first, n), default_sentinel, x).base();
      | ^~~~~~
p1261.cpp:220:24: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  220 | template<class T, class... Args>
      |                        ^~~
p1261.cpp:221:3: error: 'constexpr' does not name a type
  221 |   constexpr T* construct_at(T* location, Args&&... args);
      |   ^~~~~~~~~
p1261.cpp:221:3: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1261.cpp:223:26: warning: variadic templates only available with '-std=c++11' or '-std=gnu++11' [-Wc++11-extensions]
  223 |   template<class T, class... Args>
      |                          ^~~
p1261.cpp:224:5: error: 'constexpr' does not name a type
  224 |     constexpr T* construct_at(T* location, Args&&... args);
      |     ^~~~~~~~~
p1261.cpp:224:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1261.cpp:228:3: error: expected unqualified-id before 'for'
  228 |   for (; first != last; ++first)
      |   ^~~
p1261.cpp:228:10: error: 'first' does not name a type
  228 |   for (; first != last; ++first)
      |          ^~~~~
p1261.cpp:228:25: error: expected unqualified-id before '++' token
  228 |   for (; first != last; ++first)
      |                         ^~
p1261.cpp:230:3: error: expected unqualified-id before 'return'
  230 |   return first;
      |   ^~~~~~
p1261.cpp:233:3: error: 'constexpr' does not name a type
  233 |   constexpr void destroy_at(T* location);
      |   ^~~~~~~~~
p1261.cpp:233:3: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1261.cpp:235:12: error: 'destructible' has not been declared
  235 |   template<destructible T>
      |            ^~~~~~~~~~~~
p1261.cpp:236:5: error: 'constexpr' does not name a type
  236 |     constexpr void destroy_at(T* location) noexcept;
      |     ^~~~~~~~~
p1261.cpp:236:5: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1261.cpp:239:3: error: 'constexpr' does not name a type
  239 |   constexpr void destroy(NoThrowForwardIterator first, NoThrowForwardIterator last);
      |   ^~~~~~~~~
p1261.cpp:239:3: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1261.cpp:241:1: error: expected unqualified-id before 'for'
  241 | for (; first != last; ++first)
      | ^~~
p1261.cpp:241:8: error: 'first' does not name a type
  241 | for (; first != last; ++first)
      |        ^~~~~
p1261.cpp:241:23: error: expected unqualified-id before '++' token
  241 | for (; first != last; ++first)
      |                       ^~
p1261.cpp:244:10: error: 'nothrow' is not a type
  244 | template<nothrow-input-iterator I, nothrow-sentinel-for<I> S>
      |          ^~~~~~~
p1261.cpp:244:17: error: expected '>' before '-' token
  244 | template<nothrow-input-iterator I, nothrow-sentinel-for<I> S>
      |                 ^
p1261.cpp:245:5: error: 'requires' does not name a type
  245 |     requires destructible<iter_value_t<I>>
      |     ^~~~~~~~
p1261.cpp:245:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:246:57: error: 'nothrow' is not a type
  246 | constexpr I destroy(I first, S last) noexcept; template<nothrow-input-range R>
      |                                                         ^~~~~~~
p1261.cpp:246:64: error: expected '>' before '-' token
  246 | constexpr I destroy(I first, S last) noexcept; template<nothrow-input-range R>
      |                                                                ^
p1261.cpp:247:5: error: 'requires' does not name a type
  247 |     requires destructible<range_value_t<R>>
      |     ^~~~~~~~
p1261.cpp:247:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:251:3: error: 'constexpr' does not name a type
  251 |   constexpr NoThrowForwardIterator destroy_n(NoThrowForwardIterator first, Size n);
      |   ^~~~~~~~~
p1261.cpp:251:3: note: C++11 'constexpr' only available with '-std=c++11' or '-std=gnu++11'
p1261.cpp:253:3: error: expected unqualified-id before 'for'
  253 |   for (; n > 0; (void)++first, --n)
      |   ^~~
p1261.cpp:253:10: error: 'n' does not name a type
  253 |   for (; n > 0; (void)++first, --n)
      |          ^
p1261.cpp:253:18: error: expected unqualified-id before 'void'
  253 |   for (; n > 0; (void)++first, --n)
      |                  ^~~~
p1261.cpp:253:18: error: expected ')' before 'void'
  253 |   for (; n > 0; (void)++first, --n)
      |                 ~^~~~
      |                  )
p1261.cpp:255:3: error: expected unqualified-id before 'return'
  255 |   return first;
      |   ^~~~~~
p1261.cpp:256:29: error: 'nothrow' is not a type
  256 | namespace ranges { template<nothrow-input-iterator I>
      |                             ^~~~~~~
p1261.cpp:256:36: error: expected '>' before '-' token
  256 | namespace ranges { template<nothrow-input-iterator I>
      |                                    ^
p1261.cpp:257:5: error: 'requires' does not name a type
  257 |     requires destructible<iter_value_t<I>>
      |     ^~~~~~~~
p1261.cpp:257:5: note: 'requires' only available with '-std=c++20' or '-fconcepts'
p1261.cpp:261:1: error: expected unqualified-id before 'return'
  261 | return destroy(counted_iterator(first, n), default_sentinel).base();
      | ^~~~~~
p1261.cpp:265:2: error: expected '}' at end of input
  265 | }
      |  ^
p1261.cpp:176:18: note: to match this '{'
  176 | namespace ranges {
      |                  ^

$ g++ p1261.cpp -std=2b -o p1261g -I. -Wall
p1261.cpp:26:16: error: expected '=' before '-' token
   26 | concept nothrow-input-iterator = // exposition only
      |                ^
p1261.cpp:33:16: error: expected '=' before '-' token
   33 | concept nothrow-input-range = // exposition only
      |                ^
p1261.cpp:38:16: error: expected '=' before '-' token
   38 | concept nothrow-forward-iterator = // exposition only
      |                ^
p1261.cpp:42:16: error: expected '=' before '-' token
   42 | concept nothrow-forward-range = // exposition only
      |                ^
p1261.cpp:48:1: error: expected unqualified-id before 'for'
   48 | for (; first != last; ++first) ::new (voidify(*first))
      | ^~~
p1261.cpp:48:8: error: 'first' does not name a type
   48 | for (; first != last; ++first) ::new (voidify(*first))
      |        ^~~~~
p1261.cpp:48:23: error: expected unqualified-id before '++' token
   48 | for (; first != last; ++first) ::new (voidify(*first))
      |                       ^~
p1261.cpp:51:10: error: 'nothrow' is not a type
   51 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
      |          ^~~~~~~
p1261.cpp:51:17: error: expected '>' before '-' token
   51 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
      |                 ^
p1261.cpp:52:49: error: 'I' was not declared in this scope
   52 |     requires default_initializable<iter_value_t<I>>
      |                                                 ^
p1261.cpp:52:49: error: template argument 1 is invalid
p1261.cpp:52:14: error: template argument 1 is invalid
   52 |     requires default_initializable<iter_value_t<I>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:53:1: error: 'I' does not name a type
   53 | I uninitialized_default_construct(I first, S last);
      | ^
p1261.cpp:54:10: error: 'nothrow' is not a type
   54 | template<nothrow-forward-range R>
      |          ^~~~~~~
p1261.cpp:54:17: error: expected '>' before '-' token
   54 | template<nothrow-forward-range R>
      |                 ^
p1261.cpp:55:50: error: 'R' was not declared in this scope
   55 |     requires default_initializable<range_value_t<R>>
      |                                                  ^
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:50: error: 'R' was not declared in this scope
p1261.cpp:55:36: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
   55 |     requires default_initializable<range_value_t<R>>
      |                                    ^~~~~~~~~~~~~
      |                                    std::ranges::range_value_t
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 p1261.cpp:10:
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
  604 |     using range_value_t = iter_value_t<iterator_t<_Range>>;
      |           ^~~~~~~~~~~~~
p1261.cpp:55:50: error: 'R' was not declared in this scope
   55 |     requires default_initializable<range_value_t<R>>
      |                                                  ^
p1261.cpp:55:14: error: template argument 1 is invalid
   55 |     requires default_initializable<range_value_t<R>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:56:25: error: 'R' was not declared in this scope
   56 |     borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
      |                         ^
p1261.cpp:56:25: error: 'R' was not declared in this scope
p1261.cpp:56:25: error: 'R' was not declared in this scope
p1261.cpp:56:25: error: 'R' was not declared in this scope
p1261.cpp:56:25: error: 'R' was not declared in this scope
p1261.cpp:56:25: error: 'R' was not declared in this scope
p1261.cpp:56:25: error: 'R' was not declared in this scope
p1261.cpp:56:25: error: 'R' was not declared in this scope
p1261.cpp:56:25: error: 'R' was not declared in this scope
p1261.cpp:56:5: error: 'borrowed_iterator_t' does not name a type
   56 |     borrowed_iterator_t<R> uninitialized_default_construct(R&& r);
      |     ^~~~~~~~~~~~~~~~~~~
p1261.cpp:59:1: error: expected unqualified-id before 'for'
   59 | for (; first != last; ++first)
      | ^~~
p1261.cpp:59:8: error: 'first' does not name a type
   59 | for (; first != last; ++first)
      |        ^~~~~
p1261.cpp:59:23: error: expected unqualified-id before '++' token
   59 | for (; first != last; ++first)
      |                       ^~
p1261.cpp:61:8: error: expected unqualified-id before 'return'
   61 |        return first;
      |        ^~~~~~
p1261.cpp:63:1: error: expected unqualified-id before 'for'
   63 | for (; first != last; ++first)
      | ^~~
p1261.cpp:63:8: error: 'first' does not name a type
   63 | for (; first != last; ++first)
      |        ^~~~~
p1261.cpp:63:23: error: expected unqualified-id before '++' token
   63 | for (; first != last; ++first)
      |                       ^~
p1261.cpp:65:3: error: expected unqualified-id before 'return'
   65 |   return first;
      |   ^~~~~~
p1261.cpp:69:1: error: expected unqualified-id before 'for'
   69 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      | ^~~
p1261.cpp:69:8: error: 'n' does not name a type
   69 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |        ^
p1261.cpp:69:16: error: expected unqualified-id before 'void'
   69 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |                ^~~~
p1261.cpp:69:16: error: expected ')' before 'void'
   69 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |               ~^~~~
      |                )
p1261.cpp:71:3: error: expected unqualified-id before 'return'
   71 |   return first;
      |   ^~~~~~
p1261.cpp:72:29: error: 'nothrow' is not a type
   72 | namespace ranges { template<nothrow-forward-iterator I>
      |                             ^~~~~~~
p1261.cpp:72:36: error: expected '>' before '-' token
   72 | namespace ranges { template<nothrow-forward-iterator I>
      |                                    ^
p1261.cpp:73:49: error: 'I' was not declared in this scope
   73 |     requires default_initializable<iter_value_t<I>>
      |                                                 ^
p1261.cpp:73:49: error: template argument 1 is invalid
p1261.cpp:73:14: error: template argument 1 is invalid
   73 |     requires default_initializable<iter_value_t<I>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:74:5: error: 'I' does not name a type
   74 |     I uninitialized_default_construct_n(I first, iter_difference_t<I> n);
      |     ^
p1261.cpp:77:1: error: expected unqualified-id before 'return'
   77 | return uninitialized_default_construct(counted_iterator(first, n),
      | ^~~~~~
p1261.cpp:83:1: error: expected unqualified-id before 'for'
   83 | for (; first != last; ++first) ::new (voidify(*first))
      | ^~~
p1261.cpp:83:8: error: 'first' does not name a type
   83 | for (; first != last; ++first) ::new (voidify(*first))
      |        ^~~~~
p1261.cpp:83:23: error: expected unqualified-id before '++' token
   83 | for (; first != last; ++first) ::new (voidify(*first))
      |                       ^~
p1261.cpp:86:10: error: 'nothrow' is not a type
   86 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
      |          ^~~~~~~
p1261.cpp:86:17: error: expected '>' before '-' token
   86 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S>
      |                 ^
p1261.cpp:87:49: error: 'I' was not declared in this scope
   87 |     requires default_initializable<iter_value_t<I>>
      |                                                 ^
p1261.cpp:87:49: error: template argument 1 is invalid
p1261.cpp:87:14: error: template argument 1 is invalid
   87 |     requires default_initializable<iter_value_t<I>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:88:1: error: 'I' does not name a type
   88 | I uninitialized_value_construct(I first, S last); template<nothrow-forward-range R>
      | ^
p1261.cpp:88:60: error: 'nothrow' is not a type
   88 | I uninitialized_value_construct(I first, S last); template<nothrow-forward-range R>
      |                                                            ^~~~~~~
p1261.cpp:88:67: error: expected '>' before '-' token
   88 | I uninitialized_value_construct(I first, S last); template<nothrow-forward-range R>
      |                                                                   ^
p1261.cpp:89:50: error: 'R' was not declared in this scope
   89 |     requires default_initializable<range_value_t<R>>
      |                                                  ^
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:50: error: 'R' was not declared in this scope
p1261.cpp:89:36: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
   89 |     requires default_initializable<range_value_t<R>>
      |                                    ^~~~~~~~~~~~~
      |                                    std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
  604 |     using range_value_t = iter_value_t<iterator_t<_Range>>;
      |           ^~~~~~~~~~~~~
p1261.cpp:89:50: error: 'R' was not declared in this scope
   89 |     requires default_initializable<range_value_t<R>>
      |                                                  ^
p1261.cpp:89:14: error: template argument 1 is invalid
   89 |     requires default_initializable<range_value_t<R>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:90:25: error: 'R' was not declared in this scope
   90 |     borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
      |                         ^
p1261.cpp:90:25: error: 'R' was not declared in this scope
p1261.cpp:90:25: error: 'R' was not declared in this scope
p1261.cpp:90:25: error: 'R' was not declared in this scope
p1261.cpp:90:25: error: 'R' was not declared in this scope
p1261.cpp:90:25: error: 'R' was not declared in this scope
p1261.cpp:90:25: error: 'R' was not declared in this scope
p1261.cpp:90:25: error: 'R' was not declared in this scope
p1261.cpp:90:25: error: 'R' was not declared in this scope
p1261.cpp:90:5: error: 'borrowed_iterator_t' does not name a type
   90 |     borrowed_iterator_t<R> uninitialized_value_construct(R&& r);
      |     ^~~~~~~~~~~~~~~~~~~
p1261.cpp:95:1: error: expected unqualified-id before 'for'
   95 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      | ^~~
p1261.cpp:95:8: error: 'n' does not name a type
   95 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |        ^
p1261.cpp:95:16: error: expected unqualified-id before 'void'
   95 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |                ^~~~
p1261.cpp:95:16: error: expected ')' before 'void'
   95 | for (; n > 0; (void)++first, --n) ::new (voidify(*first))
      |               ~^~~~
      |                )
p1261.cpp:97:8: error: expected unqualified-id before 'return'
   97 |        return first;
      |        ^~~~~~
p1261.cpp:98:29: error: 'nothrow' is not a type
   98 | namespace ranges { template<nothrow-forward-iterator I>
      |                             ^~~~~~~
p1261.cpp:98:36: error: expected '>' before '-' token
   98 | namespace ranges { template<nothrow-forward-iterator I>
      |                                    ^
p1261.cpp:99:49: error: 'I' was not declared in this scope
   99 |     requires default_initializable<iter_value_t<I>>
      |                                                 ^
p1261.cpp:99:49: error: template argument 1 is invalid
p1261.cpp:99:14: error: template argument 1 is invalid
   99 |     requires default_initializable<iter_value_t<I>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:100:5: error: 'I' does not name a type
  100 |     I uninitialized_value_construct_n(I first, iter_difference_t<I> n);
      |     ^
p1261.cpp:103:1: error: expected unqualified-id before 'return'
  103 | return uninitialized_value_construct(counted_iterator(first, n),
      | ^~~~~~
p1261.cpp:108:2: error: 'uninitialized_copy' is not a type
  108 |  uninitialized_copy(IR&& in_range, OR&& out_range);
      |  ^~~~~~~~~~~~~~~~~~
p1261.cpp:108:23: error: expected ')' before '&&' token
  108 |  uninitialized_copy(IR&& in_range, OR&& out_range);
      |                    ~  ^~
      |                       )
p1261.cpp:108:23: error: expected ')' before '&&' token
  108 |  uninitialized_copy(IR&& in_range, OR&& out_range);
      |                       ^~
      |                       )
p1261.cpp:107:44: note: to match this '('
  107 |   NoThrowForwardIterator uninitialized_copy(InputIterator first, InputIterator last,
      |                                            ^
p1261.cpp:108:26: error: expected initializer before 'in_range'
  108 |  uninitialized_copy(IR&& in_range, OR&& out_range);
      |                          ^~~~~~~~
p1261.cpp:110:1: error: expected unqualified-id before 'for'
  110 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)
      | ^~~
p1261.cpp:110:8: error: 'ifirst' does not name a type
  110 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)
      |        ^~~~~~
p1261.cpp:110:44: error: expected unqualified-id before '++' token
  110 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst)
      |                                            ^~
p1261.cpp:112:3: error: expected unqualified-id before 'return'
  112 |   return {std::move(ifirst), ofirst};
      |   ^~~~~~
p1261.cpp:113:40: error: 'NoThrowForwardIterator' does not name a type
  113 |                                        NoThrowForwardIterator result);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:115:1: error: expected unqualified-id before 'for'
  115 | for (; first != last; ++result, (void) ++first) ::new (voidify(*result))
      | ^~~
p1261.cpp:115:8: error: 'first' does not name a type
  115 | for (; first != last; ++result, (void) ++first) ::new (voidify(*result))
      |        ^~~~~
p1261.cpp:115:23: error: expected unqualified-id before '++' token
  115 | for (; first != last; ++result, (void) ++first) ::new (voidify(*result))
      |                       ^~
p1261.cpp:120:1: error: 'nothrow' is not a type
  120 | nothrow-forward-iterator O, nothrow-sentinel-for<O> S2> requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
      | ^~~~~~~
p1261.cpp:120:8: error: expected '>' before '-' token
  120 | nothrow-forward-iterator O, nothrow-sentinel-for<O> S2> requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
      |        ^
p1261.cpp:120:98: error: 'O' was not declared in this scope
  120 | orward-iterator O, nothrow-sentinel-for<O> S2> requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
      |                                                                                         ^

p1261.cpp:120:99: error: template argument 1 is invalid
  120 | rward-iterator O, nothrow-sentinel-for<O> S2> requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
      |                                                                                         ^

p1261.cpp:120:66: error: template argument 1 is invalid
  120 | nothrow-forward-iterator O, nothrow-sentinel-for<O> S2> requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
      |                                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:120:152: error: 'O' was not declared in this scope
  120 | > requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
      |                                                                                                  ^

p1261.cpp:120:152: error: 'O' was not declared in this scope
p1261.cpp:120:152: error: 'O' was not declared in this scope
p1261.cpp:120:152: error: 'O' was not declared in this scope
p1261.cpp:120:152: error: 'O' was not declared in this scope
p1261.cpp:120:152: error: 'O' was not declared in this scope
p1261.cpp:120:152: error: 'O' was not declared in this scope
p1261.cpp:120:152: error: 'O' was not declared in this scope
p1261.cpp:120:152: error: 'O' was not declared in this scope
p1261.cpp:120:123: error: 'uninitialized_copy_result' does not name a type
  120 | w-sentinel-for<O> S2> requires constructible_from<iter_value_t<O>, iter_reference_t<I>> uninitialized_copy_result<I, O>
      |                                                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~

p1261.cpp:121:70: error: 'input_range' has not been declared
  121 | uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                      ^~~~~~~~~~~
p1261.cpp:121:86: error: 'nothrow' is not a type
  121 | uninitialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                                      ^~~~~~~
p1261.cpp:121:93: error: expected '>' before '-' token
  121 | itialized_copy(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                                         ^

p1261.cpp:122:47: error: 'OR' was not declared in this scope
  122 |     requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
      |                                               ^~
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:47: error: 'OR' was not declared in this scope
p1261.cpp:122:33: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
  122 |     requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
      |                                 ^~~~~~~~~~~~~
      |                                 std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
  604 |     using range_value_t = iter_value_t<iterator_t<_Range>>;
      |           ^~~~~~~~~~~~~
p1261.cpp:122:47: error: 'OR' was not declared in this scope
  122 |     requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
      |                                               ^~
p1261.cpp:122:14: error: template argument 1 is invalid
  122 |     requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:122:50: error: expected unqualified-id before ',' token
  122 |     requires constructible_from<range_value_t<OR>, range_reference_t<IR>>
      |                                                  ^
p1261.cpp:130:1: error: expected unqualified-id before 'for'
  130 | for ( ; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      | ^~~
p1261.cpp:130:9: error: 'n' does not name a type
  130 | for ( ; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      |         ^
p1261.cpp:130:16: error: expected unqualified-id before '++' token
  130 | for ( ; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      |                ^~
p1261.cpp:134:28: error: 'nothrow' is not a type
  134 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |                            ^~~~~~~
p1261.cpp:134:35: error: expected '>' before '-' token
  134 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |                                   ^
p1261.cpp:135:46: error: 'O' was not declared in this scope
  135 |     requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
      |                                              ^
p1261.cpp:135:47: error: template argument 1 is invalid
  135 |     requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
      |                                               ^
p1261.cpp:135:14: error: template argument 1 is invalid
  135 |     requires constructible_from<iter_value_t<O>, iter_reference_t<I>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:136:36: error: 'O' was not declared in this scope
  136 |     uninitialized_copy_n_result<I, O>
      |                                    ^
p1261.cpp:136:36: error: 'O' was not declared in this scope
p1261.cpp:136:36: error: 'O' was not declared in this scope
p1261.cpp:136:36: error: 'O' was not declared in this scope
p1261.cpp:136:36: error: 'O' was not declared in this scope
p1261.cpp:136:36: error: 'O' was not declared in this scope
p1261.cpp:136:36: error: 'O' was not declared in this scope
p1261.cpp:136:36: error: 'O' was not declared in this scope
p1261.cpp:136:36: error: 'O' was not declared in this scope
p1261.cpp:136:5: error: 'uninitialized_copy_n_result' does not name a type
  136 |     uninitialized_copy_n_result<I, O>
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:142:48: error: 'ifirst' was not declared in this scope
  142 |   auto t = uninitialized_copy(counted_iterator(ifirst, n),
      |                                                ^~~~~~
p1261.cpp:142:56: error: 'n' was not declared in this scope; did you mean 'yn'?
  142 |   auto t = uninitialized_copy(counted_iterator(ifirst, n),
      |                                                        ^
      |                                                        yn
p1261.cpp:143:49: error: 'ofirst' was not declared in this scope
  143 |                               default_sentinel, ofirst, olast);
      |                                                 ^~~~~~
p1261.cpp:143:57: error: 'olast' was not declared in this scope
  143 |                               default_sentinel, ofirst, olast);
      |                                                         ^~~~~
p1261.cpp:144:3: error: expected unqualified-id before 'return'
  144 |   return {std::move(t.in).base(), t.out};
      |   ^~~~~~
p1261.cpp:145:20: error: expected constructor, destructor, or type conversion before '(' token
  145 |  uninitialized_move(IR&& in_range, OR&& out_range);
      |                    ^
p1261.cpp:148:1: error: expected unqualified-id before 'for'
  148 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) ::new (voidify(*ofirst))
      | ^~~
p1261.cpp:148:8: error: 'ifirst' does not name a type
  148 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) ::new (voidify(*ofirst))
      |        ^~~~~~
p1261.cpp:148:44: error: expected unqualified-id before '++' token
  148 | for (; ifirst != ilast && ofirst != olast; ++ofirst, (void)++ifirst) ::new (voidify(*ofirst))
      |                                            ^~
p1261.cpp:150:3: error: expected unqualified-id before 'return'
  150 |   return {std::move(ifirst), ofirst};
      |   ^~~~~~
p1261.cpp:157:1: error: expected unqualified-id before 'for'
  157 | for (; first != last; (void)++result, ++first) ::new (voidify(*result))
      | ^~~
p1261.cpp:157:8: error: 'first' does not name a type
  157 | for (; first != last; (void)++result, ++first) ::new (voidify(*result))
      |        ^~~~~
p1261.cpp:157:24: error: expected unqualified-id before 'void'
  157 | for (; first != last; (void)++result, ++first) ::new (voidify(*result))
      |                        ^~~~
p1261.cpp:157:24: error: expected ')' before 'void'
  157 | for (; first != last; (void)++result, ++first) ::new (voidify(*result))
      |                       ~^~~~
      |                        )
p1261.cpp:159:3: error: expected unqualified-id before 'return'
  159 |   return result;
      |   ^~~~~~
p1261.cpp:162:1: error: 'nothrow' is not a type
  162 | nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
      | ^~~~~~~
p1261.cpp:162:8: error: expected '>' before '-' token
  162 | nothrow-forward-iterator O, nothrow-sentinel-for<O> S2>
      |        ^
p1261.cpp:163:42: error: 'O' was not declared in this scope
  163 | requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_result<I, O>
      |                                          ^
p1261.cpp:163:43: error: template argument 1 is invalid
  163 | requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_result<I, O>
      |                                           ^
p1261.cpp:163:10: error: template argument 1 is invalid
  163 | requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_result<I, O>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:163:103: error: 'O' was not declared in this scope
  163 | res constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_result<I, O>
      |                                                                                                  ^

p1261.cpp:163:103: error: 'O' was not declared in this scope
p1261.cpp:163:103: error: 'O' was not declared in this scope
p1261.cpp:163:103: error: 'O' was not declared in this scope
p1261.cpp:163:103: error: 'O' was not declared in this scope
p1261.cpp:163:103: error: 'O' was not declared in this scope
p1261.cpp:163:103: error: 'O' was not declared in this scope
p1261.cpp:163:103: error: 'O' was not declared in this scope
p1261.cpp:163:103: error: 'O' was not declared in this scope
p1261.cpp:163:74: error: 'uninitialized_move_result' does not name a type
  163 | requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>> uninitialized_move_result<I, O>
      |                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:164:70: error: 'input_range' has not been declared
  164 | uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                      ^~~~~~~~~~~
p1261.cpp:164:86: error: 'nothrow' is not a type
  164 | uninitialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                                      ^~~~~~~
p1261.cpp:164:93: error: expected '>' before '-' token
  164 | itialized_move(I ifirst, S1 ilast, O ofirst, S2 olast); template<input_range IR, nothrow-forward-range OR>
      |                                                                                         ^

p1261.cpp:165:47: error: 'OR' was not declared in this scope
  165 |     requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
      |                                               ^~
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:47: error: 'OR' was not declared in this scope
p1261.cpp:165:33: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
  165 |     requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
      |                                 ^~~~~~~~~~~~~
      |                                 std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
  604 |     using range_value_t = iter_value_t<iterator_t<_Range>>;
      |           ^~~~~~~~~~~~~
p1261.cpp:165:47: error: 'OR' was not declared in this scope
  165 |     requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
      |                                               ^~
p1261.cpp:165:14: error: template argument 1 is invalid
  165 |     requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:165:50: error: expected unqualified-id before ',' token
  165 |     requires constructible_from<range_value_t<OR>, range_rvalue_reference_t<IR>>
      |                                                  ^
p1261.cpp:173:1: error: expected unqualified-id before 'for'
  173 | for (; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      | ^~~
p1261.cpp:173:8: error: 'n' does not name a type
  173 | for (; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      |        ^
p1261.cpp:173:15: error: expected unqualified-id before '++' token
  173 | for (; n > 0; ++result, (void) ++first, --n) ::new (voidify(*result))
      |               ^~
p1261.cpp:175:4: error: expected unqualified-id before 'return'
  175 |    return {first, result};
      |    ^~~~~~
p1261.cpp:177:28: error: 'nothrow' is not a type
  177 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |                            ^~~~~~~
p1261.cpp:177:35: error: expected '>' before '-' token
  177 | template<input_iterator I, nothrow-forward-iterator O, nothrow-sentinel-for<O> S>
      |                                   ^
p1261.cpp:178:46: error: 'O' was not declared in this scope
  178 |     requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
      |                                              ^
p1261.cpp:178:47: error: template argument 1 is invalid
  178 |     requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
      |                                               ^
p1261.cpp:178:14: error: template argument 1 is invalid
  178 |     requires constructible_from<iter_value_t<O>, iter_rvalue_reference_t<I>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:179:36: error: 'O' was not declared in this scope
  179 |     uninitialized_move_n_result<I, O>
      |                                    ^
p1261.cpp:179:36: error: 'O' was not declared in this scope
p1261.cpp:179:36: error: 'O' was not declared in this scope
p1261.cpp:179:36: error: 'O' was not declared in this scope
p1261.cpp:179:36: error: 'O' was not declared in this scope
p1261.cpp:179:36: error: 'O' was not declared in this scope
p1261.cpp:179:36: error: 'O' was not declared in this scope
p1261.cpp:179:36: error: 'O' was not declared in this scope
p1261.cpp:179:36: error: 'O' was not declared in this scope
p1261.cpp:179:5: error: 'uninitialized_move_n_result' does not name a type
  179 |     uninitialized_move_n_result<I, O>
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:183:48: error: 'ifirst' was not declared in this scope
  183 |   auto t = uninitialized_move(counted_iterator(ifirst, n),
      |                                                ^~~~~~
p1261.cpp:183:56: error: 'n' was not declared in this scope
  183 |   auto t = uninitialized_move(counted_iterator(ifirst, n),
      |                                                        ^
p1261.cpp:184:49: error: 'ofirst' was not declared in this scope
  184 |                               default_sentinel, ofirst, olast);
      |                                                 ^~~~~~
p1261.cpp:184:57: error: 'olast' was not declared in this scope
  184 |                               default_sentinel, ofirst, olast);
      |                                                         ^~~~~
p1261.cpp:185:1: error: expected unqualified-id before 'return'
  185 | return {std::move(t.in).base(), t.out};
      | ^~~~~~
p1261.cpp:188:1: error: expected unqualified-id before 'for'
  188 | for (; first != last; ++first)
      | ^~~
p1261.cpp:188:8: error: 'first' does not name a type
  188 | for (; first != last; ++first)
      |        ^~~~~
p1261.cpp:188:23: error: expected unqualified-id before '++' token
  188 | for (; first != last; ++first)
      |                       ^~
p1261.cpp:190:3: error: expected unqualified-id before 'return'
  190 |   return first;
      |   ^~~~~~
p1261.cpp:193:1: error: expected unqualified-id before 'return'
  193 | return ::new (voidify(*location)) T(std::forward<Args>(args)...);
      | ^~~~~~
p1261.cpp:198:1: error: expected unqualified-id before 'for'
  198 | for (; first != last; ++first) ::new (voidify(*first))
      | ^~~
p1261.cpp:198:8: error: 'first' does not name a type
  198 | for (; first != last; ++first) ::new (voidify(*first))
      |        ^~~~~
p1261.cpp:198:23: error: expected unqualified-id before '++' token
  198 | for (; first != last; ++first) ::new (voidify(*first))
      |                       ^~
p1261.cpp:201:10: error: 'nothrow' is not a type
  201 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S, class T>
      |          ^~~~~~~
p1261.cpp:201:17: error: expected '>' before '-' token
  201 | template<nothrow-forward-iterator I, nothrow-sentinel-for<I> S, class T>
      |                 ^
p1261.cpp:202:46: error: 'I' was not declared in this scope
  202 |     requires constructible_from<iter_value_t<I>, const T&>
      |                                              ^
p1261.cpp:202:47: error: template argument 1 is invalid
  202 |     requires constructible_from<iter_value_t<I>, const T&>
      |                                               ^
p1261.cpp:202:56: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
  202 |     requires constructible_from<iter_value_t<I>, const T&>
      |                                                        ^
p1261.cpp:202:14: error: parse error in template argument list
  202 |     requires constructible_from<iter_value_t<I>, const T&>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:202:14: error: template argument 1 is invalid
p1261.cpp:202:14: error: template argument 2 is invalid
p1261.cpp:203:1: error: 'I' does not name a type
  203 | I uninitialized_fill(I first, S last, const T& x); template<nothrow-forward-range R, class T>
      | ^
p1261.cpp:203:61: error: 'nothrow' is not a type
  203 | I uninitialized_fill(I first, S last, const T& x); template<nothrow-forward-range R, class T>
      |                                                             ^~~~~~~
p1261.cpp:203:68: error: expected '>' before '-' token
  203 | I uninitialized_fill(I first, S last, const T& x); template<nothrow-forward-range R, class T>
      |                                                                    ^
p1261.cpp:204:47: error: 'R' was not declared in this scope
  204 |     requires constructible_from<range_value_t<R>, const T&>
      |                                               ^
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:47: error: 'R' was not declared in this scope
p1261.cpp:204:33: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
  204 |     requires constructible_from<range_value_t<R>, const T&>
      |                                 ^~~~~~~~~~~~~
      |                                 std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
  604 |     using range_value_t = iter_value_t<iterator_t<_Range>>;
      |           ^~~~~~~~~~~~~
p1261.cpp:204:47: error: 'R' was not declared in this scope
  204 |     requires constructible_from<range_value_t<R>, const T&>
      |                                               ^
p1261.cpp:204:14: error: template argument 1 is invalid
  204 |     requires constructible_from<range_value_t<R>, const T&>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:204:49: error: expected unqualified-id before ',' token
  204 |     requires constructible_from<range_value_t<R>, const T&>
      |                                                 ^
p1261.cpp:210:1: error: expected unqualified-id before 'for'
  210 | for (; n--; ++first) ::new (voidify(*first))
      | ^~~
p1261.cpp:210:8: error: 'n' does not name a type
  210 | for (; n--; ++first) ::new (voidify(*first))
      |        ^
p1261.cpp:210:13: error: expected unqualified-id before '++' token
  210 | for (; n--; ++first) ::new (voidify(*first))
      |             ^~
p1261.cpp:212:3: error: expected unqualified-id before 'return'
  212 |   return first;
      |   ^~~~~~
p1261.cpp:213:29: error: 'nothrow' is not a type
  213 | namespace ranges { template<nothrow-forward-iterator I, class T>
      |                             ^~~~~~~
p1261.cpp:213:36: error: expected '>' before '-' token
  213 | namespace ranges { template<nothrow-forward-iterator I, class T>
      |                                    ^
p1261.cpp:214:46: error: 'I' was not declared in this scope
  214 |     requires constructible_from<iter_value_t<I>, const T&>
      |                                              ^
p1261.cpp:214:47: error: template argument 1 is invalid
  214 |     requires constructible_from<iter_value_t<I>, const T&>
      |                                               ^
p1261.cpp:214:56: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
  214 |     requires constructible_from<iter_value_t<I>, const T&>
      |                                                        ^
p1261.cpp:214:14: error: parse error in template argument list
  214 |     requires constructible_from<iter_value_t<I>, const T&>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:214:14: error: template argument 1 is invalid
p1261.cpp:214:14: error: template argument 2 is invalid
p1261.cpp:215:5: error: 'I' does not name a type
  215 |     I uninitialized_fill_n(I first, iter_difference_t<I> n, const T& x);
      |     ^
p1261.cpp:218:1: error: expected unqualified-id before 'return'
  218 | return uninitialized_fill(counted_iterator(first, n), default_sentinel, x).base();
      | ^~~~~~
p1261.cpp:228:3: error: expected unqualified-id before 'for'
  228 |   for (; first != last; ++first)
      |   ^~~
p1261.cpp:228:10: error: 'first' does not name a type
  228 |   for (; first != last; ++first)
      |          ^~~~~
p1261.cpp:228:25: error: expected unqualified-id before '++' token
  228 |   for (; first != last; ++first)
      |                         ^~
p1261.cpp:230:3: error: expected unqualified-id before 'return'
  230 |   return first;
      |   ^~~~~~
p1261.cpp:241:1: error: expected unqualified-id before 'for'
  241 | for (; first != last; ++first)
      | ^~~
p1261.cpp:241:8: error: 'first' does not name a type
  241 | for (; first != last; ++first)
      |        ^~~~~
p1261.cpp:241:23: error: expected unqualified-id before '++' token
  241 | for (; first != last; ++first)
      |                       ^~
p1261.cpp:244:10: error: 'nothrow' is not a type
  244 | template<nothrow-input-iterator I, nothrow-sentinel-for<I> S>
      |          ^~~~~~~
p1261.cpp:244:17: error: expected '>' before '-' token
  244 | template<nothrow-input-iterator I, nothrow-sentinel-for<I> S>
      |                 ^
p1261.cpp:245:40: error: 'I' was not declared in this scope
  245 |     requires destructible<iter_value_t<I>>
      |                                        ^
p1261.cpp:245:40: error: template argument 1 is invalid
p1261.cpp:245:14: error: template argument 1 is invalid
  245 |     requires destructible<iter_value_t<I>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:246:11: error: 'I' does not name a type
  246 | constexpr I destroy(I first, S last) noexcept; template<nothrow-input-range R>
      |           ^
p1261.cpp:246:57: error: 'nothrow' is not a type
  246 | constexpr I destroy(I first, S last) noexcept; template<nothrow-input-range R>
      |                                                         ^~~~~~~
p1261.cpp:246:64: error: expected '>' before '-' token
  246 | constexpr I destroy(I first, S last) noexcept; template<nothrow-input-range R>
      |                                                                ^
p1261.cpp:247:41: error: 'R' was not declared in this scope
  247 |     requires destructible<range_value_t<R>>
      |                                         ^
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:41: error: 'R' was not declared in this scope
p1261.cpp:247:27: error: 'range_value_t' was not declared in this scope; did you mean 'std::ranges::range_value_t'?
  247 |     requires destructible<range_value_t<R>>
      |                           ^~~~~~~~~~~~~
      |                           std::ranges::range_value_t
/usr/local/include/c++/12.1.0/bits/ranges_base.h:604:11: note: 'std::ranges::range_value_t' declared here
  604 |     using range_value_t = iter_value_t<iterator_t<_Range>>;
      |           ^~~~~~~~~~~~~
p1261.cpp:247:41: error: 'R' was not declared in this scope
  247 |     requires destructible<range_value_t<R>>
      |                                         ^
p1261.cpp:247:14: error: template argument 1 is invalid
  247 |     requires destructible<range_value_t<R>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:248:35: error: 'R' was not declared in this scope
  248 |     constexpr borrowed_iterator_t<R> destroy(R&& r) noexcept;
      |                                   ^
p1261.cpp:248:35: error: 'R' was not declared in this scope
p1261.cpp:248:35: error: 'R' was not declared in this scope
p1261.cpp:248:35: error: 'R' was not declared in this scope
p1261.cpp:248:35: error: 'R' was not declared in this scope
p1261.cpp:248:35: error: 'R' was not declared in this scope
p1261.cpp:248:35: error: 'R' was not declared in this scope
p1261.cpp:248:35: error: 'R' was not declared in this scope
p1261.cpp:248:15: error: 'borrowed_iterator_t' does not name a type
  248 |     constexpr borrowed_iterator_t<R> destroy(R&& r) noexcept;
      |               ^~~~~~~~~~~~~~~~~~~
p1261.cpp:253:3: error: expected unqualified-id before 'for'
  253 |   for (; n > 0; (void)++first, --n)
      |   ^~~
p1261.cpp:253:10: error: 'n' does not name a type
  253 |   for (; n > 0; (void)++first, --n)
      |          ^
p1261.cpp:253:18: error: expected unqualified-id before 'void'
  253 |   for (; n > 0; (void)++first, --n)
      |                  ^~~~
p1261.cpp:253:18: error: expected ')' before 'void'
  253 |   for (; n > 0; (void)++first, --n)
      |                 ~^~~~
      |                  )
p1261.cpp:255:3: error: expected unqualified-id before 'return'
  255 |   return first;
      |   ^~~~~~
p1261.cpp:256:29: error: 'nothrow' is not a type
  256 | namespace ranges { template<nothrow-input-iterator I>
      |                             ^~~~~~~
p1261.cpp:256:36: error: expected '>' before '-' token
  256 | namespace ranges { template<nothrow-input-iterator I>
      |                                    ^
p1261.cpp:257:40: error: 'I' was not declared in this scope
  257 |     requires destructible<iter_value_t<I>>
      |                                        ^
p1261.cpp:257:40: error: template argument 1 is invalid
p1261.cpp:257:14: error: template argument 1 is invalid
  257 |     requires destructible<iter_value_t<I>>
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
p1261.cpp:258:15: error: 'I' does not name a type
  258 |     constexpr I destroy_n(I first, iter_difference_t<I> n) noexcept;
      |               ^
p1261.cpp:261:1: error: expected unqualified-id before 'return'
  261 | return destroy(counted_iterator(first, n), default_sentinel).base();
      | ^~~~~~
p1261.cpp:265:2: error: expected '}' at end of input
  265 | }
      |  ^
p1261.cpp:176:18: note: to match this '{'
  176 | namespace ranges {
      |                  ^

検討事項(agenda)

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

応用例1 AUTOSAR C++

AUTOSARでC++のコーディング標準を作っている。 
MISRA-C++コーディング標準の改訂をまたずに、C++14に対応したかったためかもしれない。 

Autosar Guidelines C++14 example code compile list

応用例2 MISRA C++

MISRA C++, AUTOSAR C++について

MISRA C++ 5-0-16

応用例3 CERT C++

MISRA C/C++, AUTOSAR C++, CERT C/C++とC/C++工業標準をコンパイルする

応用例4 箱庭 

箱庭ではUnityをはじめC++を使っているらしい。 

ここでコンパイルしたコードと同じようなコードを使っているか、
ここで出たコンパイルエラーと同じようなエラーがでたかを
いろいろな版のコンパイラでコンパイルして確認していく。

仮想戦略会議「箱庭」

お盆には「箱庭」記事を書きましょう「もくもく会」の題材になる(1)

お盆には「箱庭」記事を書きましょう「もくもく会」の題材になる(2)

参考資料(reference)

エンジニア夏休み企画 個人開発

自己参考資料(self 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 使ってみた

【個人開発】 効率的な背景 <エンジニア夏休み企画>

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

文書履歴(document history)

ver. 0.01 初稿  20220816

0
0
0

Register as a new user and use Qiita more conveniently

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