]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/testsuite/std/ranges/headers/ranges/synopsis.cc
1 // Copyright (C) 2019-2022 Free Software Foundation, Inc.
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING3. If not see
16 // <http://www.gnu.org/licenses/>.
18 // { dg-options "-std=gnu++2a" }
19 // { dg-do compile { target c++2a } }
23 #ifndef __cpp_lib_ranges
24 # error "Feature test macro for ranges is missing in <ranges>"
25 #elif __cpp_lib_ranges < 201911L
26 # error "Feature test macro for ranges has wrong value in <ranges>"
30 template<> constexpr bool std::ranges::disable_sized_range
<R
> = true;
34 constexpr const bool* disable_sized_range
35 = &std::ranges::disable_sized_range
<void>;
36 using std::ranges::begin
;
37 using std::ranges::end
;
38 using std::ranges::cbegin
;
39 using std::ranges::cend
;
40 using std::ranges::rbegin
;
41 using std::ranges::rend
;
42 using std::ranges::crbegin
;
43 using std::ranges::crend
;
44 using std::ranges::size
;
45 using std::ranges::ssize
;
46 using std::ranges::empty
;
47 using std::ranges::data
;
48 using std::ranges::cdata
;
50 using std::ranges::advance
;
51 using std::ranges::distance
;
52 using std::ranges::next
;
53 using std::ranges::prev
;