id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
C++_Ranges_library/C++_Ranges_library_10_23.txt | [ ` <flat_map> ` ](/w/cpp/header/flat_map "cpp/header/flat map") ` | Header
| Pseudo container | Sequence containers | Associative containers | Unordered associative containers | Container adaptors |
* Note: functions in two different extract lines have different meanings and syntax:
1. ↑ e... | |
C++_Ranges_library/C++_Ranges_library_95_9.txt | s://wg21.link/P2714R1)
` __cpp_lib_bit_cast ` | [ ` std::bit_cast ` ](/w/cpp/numeric/bit_cast "cpp/numeric/bit cast") | 201806L | [ ` <bit> ` ](/w/cpp/header/bit "cpp/header/bit") | (C++20) | [ P0476R2 ](https://wg21.link/P0476R2)
` __cpp_lib_bitops ` | [ Bit operations ](/w/cpp/numeric#Bit_manipulation_.28... | |
C++_Ranges_library/C++_Ranges_library_59_48.txt | res random_access_range<Base>;
constexpr auto operator[](difference_type n) const requires random_access_range<Base>
{
return __reference_type(pos_ + n, current_[n]);
}
friend constexpr bool operator==(const iterator& x, const iterator& y) noexcept;
friend constexpr str... | |
C++_Ranges_library/C++_Ranges_library_108_6.txt | {
auto v = [std::vector](http://en.cppreference.com/w/cpp/container/vector){1, 2, 3, 1, 2, 3, 3, 3, 1, 2, 3};
auto fun = std::[ranges::less](http://en.cppreference.com/w/cpp/ranges-functional-placeholder/less){};
auto view = v | std::views::chunk_by(fun);
print_chunks(vie... | |
C++_Ranges_library/C++_Ranges_library_95_38.txt | ### Navigation
* [ Support us ](http://www.cppreference.com/support)
* [ Recent changes ](/w/Special:RecentChanges "A list of recent changes in the wiki \[r\]")
* [ FAQ ](/w/Cppreference:FAQ)
* [ Offline version ](/w/Cppreference:Archives)
##### Toolbox
* [ What links here ](/w/Special:WhatLinksHere/cpp/... | |
C++_Ranges_library/C++_Ranges_library_56_39.txt | ` ](/w/cpp/thread/stop_source "cpp/thread/stop source") (since
C++20)
[ ` stop_token ` ](/w/cpp/thread/stop_token "cpp/thread/stop token") (since
C++20)
[ ` strcat() ` ](/w/cpp/string/byte/strcat "cpp/string/byte/strcat")
[ ` strchr() ` ](/w/cpp/string/byte/strchr "cpp/string/byte/strchr")
[ ` strcmp() ` ](/w/... | |
C++_Ranges_library/C++_Ranges_library_44_3.txt | s::iota ` ](/w/cpp/ranges/iota_view "cpp/ranges/iota view")
The ranges library includes [ range algorithms ](/w/cpp/algorithm/ranges
"cpp/algorithm/ranges") , which are applied to ranges eagerly, and [ range
adaptors ](/w/cpp/ranges#Range_adaptors "cpp/ranges") , which are applied to
views lazily. Adaptors can be comp... | |
C++_Ranges_library/C++_Ranges_library_8_6.txt | p://en.cppreference.com/w/cpp/ranges/borrowed_range) < V > ; | | (since C++23)
---|---|---
| |
This specialization of [ ` ranges::enable_borrowed_range `
](/w/cpp/ranges/borrowed_range "cpp/ranges/borrowed range") makes ` slide_view
` satisfy [ ` borrowed_range ` ](/w/cpp/ranges/borrowed_range
"cpp/rang... | |
C++_Ranges_library/C++_Ranges_library_112_0.txt | ##### [ cppreference.com ](/)
[ Create account
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Futility&type=signup)
* [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Futility "You are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/util... | |
C++_Ranges_library/C++_Ranges_library_126_21.txt | view") | 202207L | [ ` <ranges> ` ](/w/cpp/header/ranges "cpp/header/ranges") | (C++23) | [ P2278R4 ](https://wg21.link/P2278R4)
Making std::basic_const_iterator follow its underlying type's convertibility | 202311L | [ ` <ranges> ` ](/w/cpp/header/ranges "cpp/header/ranges") | (C++26) | [ P2836R1 ](h... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_141_0.txt | 1
C++ Integer Followed by char gets accepted as an input | |
C++_Ranges_library/C++_Ranges_library_130_21.txt | view") | 202207L | [ ` <ranges> ` ](/w/cpp/header/ranges "cpp/header/ranges") | (C++23) | [ P2278R4 ](https://wg21.link/P2278R4)
Making std::basic_const_iterator follow its underlying type's convertibility | 202311L | [ ` <ranges> ` ](/w/cpp/header/ranges "cpp/header/ranges") | (C++26) | [ P2836R1 ](h... | |
C++_Ranges_library/C++_Ranges_library_82_11.txt | dit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/ranges/dsc_partition&action=edit)
[ ranges::partition_copy ](/w/cpp/algorithm/ranges/partition_copy "cpp/algorithm/ranges/partition copy") (C++20) | copies a range dividing the elements into two groups
(niebloid) [ [edit]
](https:/... | |
C++_Ranges_library/C++_Ranges_library_141_13.txt | ") | (C++20) | [ P1001R2 ](https://wg21.link/P1001R2)
` __cpp_lib_expected ` | class template std::expected | 202202L | [ ` <expected> ` ](/w/cpp/header/expected "cpp/header/expected") | (C++23) | [ P0323R12 ](https://wg21.link/P0323R12)
Monadic functions for std::expected | 202211L | [ ` <expected... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_17_0.txt | Learn more about Teams
Get early access and see previews of new features. | |
C++_Ranges_library/C++_Ranges_library_11_35.txt | return x.supported();
}));
}
[std::printf](http://en.cppreference.com/w/cpp/io/c/fprintf)("%td)\n", [std::distance](http://en.cppreference.com/w/cpp/iterator/distance)([std::begin](http://en.cppreference.com/w/cpp/iterator/begin)(co), [std::end](http://... | |
C++_Ranges_library/C++_Ranges_library_135_3.txt | /www.cppreference.com/support)
* [ Recent changes ](/w/Special:RecentChanges "A list of recent changes in the wiki \[r\]")
* [ FAQ ](/w/Cppreference:FAQ)
* [ Offline version ](/w/Cppreference:Archives)
##### Toolbox
* [ What links here ](/w/Special:WhatLinksHere/cpp/ranges/input_range "A list of all wiki pag... | |
C++_Ranges_library/C++_Ranges_library_150_5.txt | 201510L | (C++17) | [ P0012R1 ](https://wg21.link/P0012R1)
` __cpp_nontype_template_args ` | Allow constant evaluation for all [ non-type template arguments ](/w/cpp/language/template_parameters#Template_non-type_arguments "cpp/language/template parameters") | 201411L | (C++17) | [ N4268 ](https://wg21.lin... | |
C++_Ranges_library/C++_Ranges_library_136_30.txt | que_object_representations)
COMPILER_FEATURE_ENTRY(201603L, __cpp_lib_hypot)
COMPILER_FEATURE_ENTRY(201505L, __cpp_lib_incomplete_container_elements)
COMPILER_FEATURE_ENTRY(201411L, __cpp_lib_invoke)
COMPILER_FEATURE_ENTRY(201703L, __cpp_lib_is_aggregate)
COMPILER_FEATURE_ENTRY(2... | |
C++_Ranges_library/C++_Ranges_library_150_20.txt | 0307R2 ](https://wg21.link/P0307R2)
Fully ` constexpr ` [ std::optional ](/w/cpp/utility/optional "cpp/utility/optional") | 202106L | [ ` <optional> ` ](/w/cpp/header/optional "cpp/header/optional") | (C++20)
(DR) | [ P2231R1 ](https://wg21.link/P2231R1)
[ Monadic operations ](/w/cpp/utility/optional#Mona... | |
C++_Ranges_library/C++_Ranges_library_109_2.txt | ct initialization ](/w/cpp/language/direct_initialization "cpp/language/direct initialization") | 201902L | (C++20) | [ P0960R3 ](https://wg21.link/P0960R3)
` __cpp_alias_templates ` | [ Alias templates ](/w/cpp/language/type_alias "cpp/language/type alias") | 200704L | (C++11) | [ N2258 ](https://wg21.lin... | |
C++_Ranges_library/C++_Ranges_library_43_0.txt | ##### [ cppreference.com ](/)
[ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Fheader "You
are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/header "View the content page \[c\]")
* [ Discussion ](/w/Talk:cpp/header "Discussion about the content ... | |
C++_Ranges_library/C++_Ranges_library_59_57.txt | :ranges {
template<class I>
constexpr I __div_ceil(I num, I denom) { // exposition only
I r = num / denom;
if (num % denom)
++r;
return r;
}
template<view V>
requires input_range<V>
class chunk_view : public view_interface<ch... | |
C++_Ranges_library/C++_Ranges_library_74_6.txt | void , both the reference type and the value type are inferred from ` Ref `
---|---|---
V | \- | the value type ( ` range_value_t ` ) of the generator, or void
Allocator | \- | an allocator type or void
If ` Allocator ` is not void , then the behavior is undefined if ` Allocator
` does not m... | |
C++_Ranges_library/C++_Ranges_library_57_27.txt | rary
# include <boost/optional.hpp>
# else // Not found at all
# error "Missing <optional>"
# endif
#endif
#ifdef __has_cpp_attribute // Check if __has_cpp_attribute is present
# if __has_cpp_attribute(deprecated) ... | |
C++_Ranges_library/accumulate4_17_0.txt |
#include <functional>
#include <iostream>
#include <numeric>
#include <string>
#include <vector>
int main()
{
std::vector<int> v{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
int sum = std::accumulate(v.begin(), v.end(), 0);
int product = std::accumulate(v.beg... | |
C++_Ranges_library/C++_Ranges_library_103_3.txt |
1) A range adaptor that represents a view of underlying [ ` view `
](/w/cpp/ranges/view "cpp/ranges/view") with reversed order.
2) [ RangeAdaptorObject ](/w/cpp/named_req/RangeAdaptorObject "cpp/named
req/RangeAdaptorObject") . The expression views :: reverse ( e ) is [
expression-equivalent ](/w/cpp/lang... | |
C++_Ranges_library/C++_Ranges_library_4_0.txt | ##### [ cppreference.com ](/)
[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Fheader%2Fgenerator
"You are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/header/generator "View the content page \[c\]")
* [ Discussion ](/mwiki/index.php?title=Talk... | |
C++_Ranges_library/C++_Ranges_library_93_2.txt | ges/lazy_split_view
"cpp/ranges/lazy split view")
[ split_view views::split ](/w/cpp/ranges/split_view "cpp/ranges/split
view")
[ views::counted ](/w/cpp/ranges/view_counted "cpp/ranges/view counted")
[ common_view views::common ](/w/cpp/ranges/common_view "cpp/ranges/common
view")
| [ reverse_vi... | |
C++_Ranges_library/C++_Ranges_library_35_0.txt | ##### [ cppreference.com ](/)
[ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Fregex "You
are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/regex "View the content page \[c\]")
* [ Discussion ](/w/Talk:cpp/regex "Discussion about the content pag... | |
C++_Ranges_library/C++_Ranges_library_126_32.txt | this_parameter)
COMPILER_FEATURE_ENTRY(202106L, __cpp_if_consteval)
COMPILER_FEATURE_ENTRY(202207L, __cpp_implicit_move)
COMPILER_FEATURE_ENTRY(202211L, __cpp_multidimensional_subscript)
COMPILER_FEATURE_ENTRY(202207L, __cpp_named_character_escapes)
COMPILER_FEATURE_ENTRY(202211L... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_92_0.txt | Add a comment |
0 | |
C++_Ranges_library/C++_Ranges_library_146_4.txt | C++23)
| |
The default constructor is provided if and only if ` T ` models [ `
default_initializable ` ](/w/cpp/concepts/default_initializable
"cpp/concepts/default initializable") .
A default-constructed wrapper contains a value-initialized ` T ` object.
## Assignment operators
| (1) |
---|---|--- ... | |
C++_Ranges_library/C++_Ranges_library_28_1.txt | _t sentinel_t const_sentinel_t
](/w/cpp/ranges/iterator_t "cpp/ranges/iterator t") (C++23) (C++23)
---
| [ range_const_reference_t range_rvalue_reference_t
range_common_reference_t ](/w/cpp/ranges/iterator_t "cpp/ranges/iterator t")
(C++23)
---
| [ elements_of ](/w/cpp/ranges/elements_of "cp... | |
C++_Ranges_library/C++_Ranges_library_57_21.txt | view") | 202207L | [ ` <ranges> ` ](/w/cpp/header/ranges "cpp/header/ranges") | (C++23) | [ P2278R4 ](https://wg21.link/P2278R4)
Making std::basic_const_iterator follow its underlying type's convertibility | 202311L | [ ` <ranges> ` ](/w/cpp/header/ranges "cpp/header/ranges") | (C++26) | [ P2836R1 ](h... | |
C++_Ranges_library/C++_Ranges_library_55_1.txt | onst_sentinel_t
](/w/cpp/ranges/iterator_t "cpp/ranges/iterator t") (C++23) (C++23)
---
| [ range_const_reference_t range_rvalue_reference_t
range_common_reference_t ](/w/cpp/ranges/iterator_t "cpp/ranges/iterator t")
(C++23)
---
| [ elements_of ](/w/cpp/ranges/elements_of "cpp/ranges/elements... | |
C++_Ranges_library/C++_Ranges_library_126_8.txt | set> ` ](/w/cpp/header/unordered_set "cpp/header/unordered set") | (C++26) | [ P2363R5 ](https://wg21.link/P2363R5)
` __cpp_lib_assume_aligned ` | [ std::assume_aligned ](/w/cpp/memory/assume_aligned "cpp/memory/assume aligned") | 201811L | [ ` <memory> ` ](/w/cpp/header/memory "cpp/header/memory") | (C++20) ... | |
C++_Ranges_library/C++_Ranges_library_4_2.txt | rithm "cpp/header/algorithm")
---
| [ ` <numeric> ` ](/w/cpp/header/numeric "cpp/header/numeric")
---
Numerics
| [ ` <cfenv> ` ](/w/cpp/header/cfenv "cpp/header/cfenv") (C++11)
---
[ ` <complex> ` ](/w/cpp/header/complex "cpp/header/complex")
| [ ` <random> ` ](/w/cpp/header/random "cpp/head... | |
C++_Ranges_library/C++_Ranges_library_115_0.txt | ##### [ cppreference.com ](/)
[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges%2Fcrend "You
are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/ranges/crend "View the content page \[c\]")
* [ Discussion ](/mwiki/index.php?title=Talk:cpp/ran... | |
C++_Ranges_library/C++_Ranges_library_28_0.txt | ##### [ cppreference.com ](/)
[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges%2Fkeys+view
"You are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/ranges/keys_view "View the content page \[c\]")
* [ Discussion ](/mwiki/index.php?title=Talk... | |
C++_Ranges_library/C++_Ranges_library_44_13.txt | lib_ranges_to_container ` ](/w/cpp/feature_test#cpp_lib_ranges_to_container "cpp/feature test") | 202202L | (C++23) | std::ranges::to
[ ` __cpp_lib_ranges_zip ` ](/w/cpp/feature_test#cpp_lib_ranges_zip "cpp/feature test") | 202110L | (C++23) | std::ranges::zip_view ,
std::ranges::zip_transform_view , ... | |
C++_Ranges_library/C++_Ranges_library_84_5.txt | a sentinel for the constant iterator of the range.
(public member function of ` std::ranges::view_interface<D> ` ) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/view_interface/dsc_cend&action=edit)
[ operator bool ](/w/cpp/ranges/view_interface/operator_bool "cpp/ranges/view in... | |
C++_Ranges_library/param-pack.html4_79_0.txt | The two disadvantages are that youâll have to call the function with an
extra set of braces, as in ` alsmost_good3({obj, Obj{}}) ` , and that you only
have ` const ` access to members of ` std::initializer_list ` , so it wonât
work with our example ` Obj ` type, in which the ` use() ` method is not `
const ` .
## ... | |
C++_Ranges_library/C++_Ranges_library_64_7.txt | 3) | [ P0401R6 ](https://wg21.link/P0401R6)
[ P2652R2 ](https://wg21.link/P2652R2)
[ LWG3887 ](https://wg21.link/LWG3887)
` __cpp_lib_allocator_ traits_is_always_equal ` | [ ` std::allocator_traits::is_always_equal ` ](/w/cpp/memory/allocator_traits "cpp/memory/allocator traits") | 201411L | [ ` <memory> ... | |
C++_Ranges_library/C++_Ranges_library_130_37.txt | pe 2017-11 = 2017-11
... truncated ...
C++14 CORE (9/9)
__cpp_aggregate_nsdmi 2013-04 = 2013-04
__cpp_binary_literals 2013-04 = 2013-04
__cpp_constexpr 2022-11 > 2013-04
... truncated ..... | |
C++_Ranges_library/C++_Ranges_library_153_22.txt | https://wg21.link/P1206R7)
` __cpp_lib_ranges_zip ` | std::ranges::zip_view , std::ranges::zip_transform_view , std::ranges::adjacent_view , std::ranges::adjacent_transform_view | 202110L | [ ` <ranges> ` ](/w/cpp/header/ranges "cpp/header/ranges") [ ` <tuple> ` ](/w/cpp/header/tuple "cpp/header/tuple") [ ... | |
C++_Ranges_library/C++_Ranges_library_63_3.txt |
1) A range adaptor that represents a view of underlying [ ` view `
](/w/cpp/ranges/view "cpp/ranges/view") whose elements are rvalues.
2) [ RangeAdaptorObject ](/w/cpp/named_req/RangeAdaptorObject "cpp/named
req/RangeAdaptorObject") . Let e be a subexpression and let T be decltype
( ( e ) ) . Then ... | |
C++_Ranges_library/C++_Ranges_library_136_12.txt | r/vector") | 201907L | [ ` <vector> ` ](/w/cpp/header/vector "cpp/header/vector") | (C++20) | [ P1004R2 ](https://wg21.link/P1004R2)
` __cpp_lib_containers_ranges ` | [ Ranges-aware ](/w/cpp/ranges/to#container_compatible_range "cpp/ranges/to") construction and insertion for containers and strings | 202202L ... | |
C++_Ranges_library/C++_Ranges_library_140_18.txt | s (e.g., [ span-lite ](https://github.com/martinmoene/span-lite) , [ scope-lite ](https://github.com/martinmoene/scope-lite) , [ expected-lite ](https://github.com/martinmoene/expected-lite) ) containing C++98/11 implementations of some of the proposed or already standardized C++17/20/23 library types, such as std::sp... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_29_0.txt | * Check if the input operation failed.
– chris | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_6_0.txt | company blog
2. 3. Log in
4. Sign up | |
C++_Ranges_library/C++_Ranges_library_42_4.txt | ct&oldid=159992 "Permanent link to this revision of the page")
* [ Page information ](/mwiki/index.php?title=cpp/named_req/RangeAdaptorObject&action=info)
* In other languages
* [ Deutsch ](http://de.cppreference.com/w/cpp/named_req/RangeAdaptorObject "cpp/named req/RangeAdaptorObject")
* [ Español ](http://... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_80_0.txt | 15.8k 1 1 gold badge 27 27 silver badges 42 42 bronze badges
1 | |
C++_Ranges_library/C++_Ranges_library_57_35.txt | return x.supported();
}));
}
[std::printf](http://en.cppreference.com/w/cpp/io/c/fprintf)("%td)\n", [std::distance](http://en.cppreference.com/w/cpp/iterator/distance)([std::begin](http://en.cppreference.com/w/cpp/iterator/begin)(co), [std::end](http://... | |
C++_Ranges_library/C++_Ranges_library_29_11.txt | pp/header/cmath "cpp/header/cmath") [ ` <cstdlib> ` ](/w/cpp/header/cstdlib "cpp/header/cstdlib") | (C++26) | [ P1383R2 ](https://wg21.link/P1383R2)
` __cpp_lib_constexpr_complex ` | Constexpr for [ std::complex ](/w/cpp/numeric/complex "cpp/numeric/complex") | 201711L | [ ` <complex> ` ](/w/cpp/header/comple... | |
C++_Ranges_library/C++_Ranges_library_139_11.txt | > )
return const_cast < const R & > ( r ) ;
else
return r ;
} | (1) | ( exposition only* )
---|---|---
template < class T >
constexpr auto /* as-const-pointer */ ( const T * p ) noexcept
{
return p ;
} | (2) | ( exposition only* )
| |
Some range access ... | |
C++_Ranges_library/C++_Ranges_library_56_37.txt | lags() ` ](/w/cpp/io/manip/setiosflags "cpp/io/manip/setiosflags")
[ ` setlocale() ` ](/w/cpp/locale/setlocale "cpp/locale/setlocale")
[ ` setprecision() ` ](/w/cpp/io/manip/setprecision
"cpp/io/manip/setprecision")
[ ` setvbuf() ` ](/w/cpp/io/c/setvbuf "cpp/io/c/setvbuf")
[ ` setw() ` ](/w/cpp/io/manip/setw "c... | |
C++_Ranges_library/C++_Ranges_library_111_2.txt | it ](/w/cpp/ranges/lazy_split_view
"cpp/ranges/lazy split view")
[ split_view views::split ](/w/cpp/ranges/split_view "cpp/ranges/split
view")
[ views::counted ](/w/cpp/ranges/view_counted "cpp/ranges/view counted")
[ common_view views::common ](/w/cpp/ranges/common_view "cpp/ranges/common
view")
... | |
C++_Ranges_library/C++_Ranges_library_70_23.txt | ](/w/cpp/memory/shared_ptr/make_shared "cpp/memory/shared ptr/make shared") | 201707L | [ ` <memory> ` ](/w/cpp/header/memory "cpp/header/memory") | (C++20) | [ P0674R1 ](https://wg21.link/P0674R1)
` __cpp_lib_shared_ptr_weak_type ` | [ ` shared_ptr::weak_type ` ](/w/cpp/memory/shared_ptr "cpp/memory/shared pt... | |
C++_Ranges_library/C++_Ranges_library_155_6.txt | /subrange") (C++20) | combines an iterator-sentinel pair into a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view")
(class template) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_subrange&action=edit)
### [ [ edit ](/mwiki/index.php?title=cpp/ranges&action=edit§ion=... | |
C++_Ranges_library/C++_Ranges_library_23_10.txt | duct_view "cpp/ranges/cartesian product view") (C++23) | a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") consisting of tuples of results calculated by the n-ary cartesian product of the adapted views
(class template) (customization point object) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=T... | |
C++_Ranges_library/C++_Ranges_library_46_0.txt | ##### [ cppreference.com ](/)
[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Futility%2Ffeature+test
"You are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/utility/feature_test "View the content page \[c\]")
* [ Discussion ](/w/Talk:cpp/utility... | |
C++_Ranges_library/C++_Ranges_library_148_2.txt | /cpp/ranges/lazy_split_view
"cpp/ranges/lazy split view")
[ split_view views::split ](/w/cpp/ranges/split_view "cpp/ranges/split
view")
[ views::counted ](/w/cpp/ranges/view_counted "cpp/ranges/view counted")
[ common_view views::common ](/w/cpp/ranges/common_view "cpp/ranges/common
view")
| [ re... | |
C++_Ranges_library/C++_Ranges_library_153_10.txt | ](https://wg21.link/P2592R3)
` __cpp_lib_chrono_udls ` | [ User-defined literals for time types ](/w/cpp/chrono/duration#Literals "cpp/chrono/duration") | 201304L | [ ` <chrono> ` ](/w/cpp/header/chrono "cpp/header/chrono") | (C++14) | [ N3642 ](https://wg21.link/N3642)
` __cpp_lib_clamp ` | [ std::clamp ]... | |
C++_Ranges_library/what-will-be-the-output-of-the-following-c-code--5ab8a41bc56b6664bc9bacdd8_35_0.txt | Q3. Consider the following segment of C code int j, n; j = 1; while (j <= n)
j=j*2; The number of comparisons made in the execution of the loop for any n >
0 is
Q4. In C programming, which of the following loop use explicitly breaks out
of the loop by executing the break; statement? | |
C++_Ranges_library/C++_Ranges_library_141_27.txt | rary
# include <boost/optional.hpp>
# else // Not found at all
# error "Missing <optional>"
# endif
#endif
#ifdef __has_cpp_attribute // Check if __has_cpp_attribute is present
# if __has_cpp_attribute(deprecated) ... | |
C++_Ranges_library/C++_Ranges_library_32_0.txt | ##### [ cppreference.com ](/)
[ Create account
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Fheader%2Fiterator&type=signup)
* [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Fheader%2Fiterator "You are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* ... | |
C++_Ranges_library/C++_Ranges_library_53_2.txt | split_view views::lazy_split ](/w/cpp/ranges/lazy_split_view
"cpp/ranges/lazy split view")
[ split_view views::split ](/w/cpp/ranges/split_view "cpp/ranges/split
view")
[ views::counted ](/w/cpp/ranges/view_counted "cpp/ranges/view counted")
[ common_view views::common ](/w/cpp/ranges/common_view "cpp/rang... | |
C++_Ranges_library/C++_Ranges_library_73_10.txt | ](https://wg21.link/P2592R3)
` __cpp_lib_chrono_udls ` | [ User-defined literals for time types ](/w/cpp/chrono/duration#Literals "cpp/chrono/duration") | 201304L | [ ` <chrono> ` ](/w/cpp/header/chrono "cpp/header/chrono") | (C++14) | [ N3642 ](https://wg21.link/N3642)
` __cpp_lib_clamp ` | [ std::clamp ]... | |
C++_Ranges_library/C++_Ranges_library_56_16.txt | tility/format/basic format parse context") (since C++20)
[ ` format_string ` ](/w/cpp/utility/format/basic_format_string
"cpp/utility/format/basic format string") <> (since C++20)
[ ` format_to<>() ` ](/w/cpp/utility/format/format_to
"cpp/utility/format/format to") (since C++20)
[ ` format_to_n<>() ` ](/w/cpp/uti... | |
C++_Ranges_library/C++_Ranges_library_136_3.txt | https://wg21.link/P1668R1)
Changing the active member of a union in constant evaluation | 202002L | (C++20) | [ P1330R0 ](https://wg21.link/P1330R0)
[ P2493R0 ](https://wg21.link/P2493R0)
Non- [ literal ](/w/cpp/named_req/LiteralType "cpp/named req/LiteralType") variables, labels, and [ ` goto ` ](/w/cpp/l... | |
C++_Ranges_library/C++_Ranges_library_64_17.txt | ader/functional") | (C++17) | [ N4169 ](https://wg21.link/N4169)
` __cpp_lib_invoke_r ` | [ ` std::invoke_r ` ](/w/cpp/utility/functional/invoke "cpp/utility/functional/invoke") | 202106L | [ ` <functional> ` ](/w/cpp/header/functional "cpp/header/functional") | (C++23) | [ P2136R3 ](https://wg21.link/P2136... | |
C++_Ranges_library/C++_Ranges_library_86_1.txt | erator t")
---
| [ iterator_t const_iterator_t sentinel_t const_sentinel_t
](/w/cpp/ranges/iterator_t "cpp/ranges/iterator t") (C++23) (C++23)
---
| [ range_const_reference_t range_rvalue_reference_t
range_common_reference_t ](/w/cpp/ranges/iterator_t "cpp/ranges/iterator t")
(C++23)
---
... | |
C++_Ranges_library/C++_Ranges_library_110_2.txt | counted ](/w/cpp/ranges/view_counted "cpp/ranges/view counted")
[ common_view views::common ](/w/cpp/ranges/common_view "cpp/ranges/common
view")
| [ reverse_view views::reverse ](/w/cpp/ranges/reverse_view
"cpp/ranges/reverse view")
---
[ as_const_view views::as_const ](/w/cpp/ranges/as_const_... | |
C++_Ranges_library/C++_Ranges_library_88_8.txt | range adaptor object) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_lazy_split_view&action=edit)
[ views::counted ](/w/cpp/ranges/view_counted "cpp/ranges/view counted") (C++20) | creates a subrange from an iterator and a count
(customization point object) [ [edit]
](htt... | |
C++_Ranges_library/C++_Ranges_library_59_62.txt | __movable_box<Pred> pred_ = Pred(); // exposition only
// class chunk_by_view::iterator
class iterator; // exposition only
public:
chunk_by_view() requires default_initializable<V> &&
default_initializable... | |
C++_Ranges_library/C++_Ranges_library_112_7.txt | /rel ops/operator cmp") (deprecated in C++20) | automatically generates comparison operators based on user-defined operator == and operator <
(function template) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/utility/rel_ops/dsc_operator_cmp&action=edit)
### [ [ edit ](/mwiki... | |
C++_Ranges_library/C++_Ranges_library_142_6.txt | n_with(' ');
for (auto c : joined)
[std::cout](http://en.cppreference.com/w/cpp/io/cout) << c;
[std::cout](http://en.cppreference.com/w/cpp/io/cout) << '\n';
}
Output:
This is a test.
### [ [ edit
](/mwiki/index.php?title=cpp/ranges/join_with_view&action=edit§... | |
C++_Ranges_library/C++_Ranges_library_46_9.txt | ](/w/cpp/header/span "cpp/header/span")
` __cpp_lib_span_initializer_list ` | 202311L | [ ` <span> ` ](/w/cpp/header/span "cpp/header/span")
` __cpp_lib_spanstream ` | 202106L | [ ` <spanstream> ` ](/w/cpp/header/spanstream "cpp/header/spanstream")
` __cpp_lib_ssize ` | 201902L | [ ` <iterator> ` ](/w/c... | |
C++_Ranges_library/what-will-be-the-output-of-the-following-c-code--5ab8a41bc56b6664bc9bacdd8_14_0.txt | Crack with
India's Super Teachers | |
C++_Ranges_library/accumulate4_0_0.txt | ##### cppreference.com
Create account | |
C++_Ranges_library/C++_Ranges_library_99_12.txt | /ranges") and [ std::counted_iterator ](/w/cpp/iterator/counted_iterator "cpp/iterator/counted iterator") | [ P2259R1 ](https://wg21.link/P2259R1) | 12 | | 19.30* (partial)*
19.31* | | | |
DR20: [ ` views::join ` ](/w/cpp/ranges/join_view "cpp/ranges/join view") should join all views of ranges | [ P... | |
C++_Ranges_library/C++_Ranges_library_153_3.txt | https://wg21.link/P1668R1)
Changing the active member of a union in constant evaluation | 202002L | (C++20) | [ P1330R0 ](https://wg21.link/P1330R0)
[ P2493R0 ](https://wg21.link/P2493R0)
Non- [ literal ](/w/cpp/named_req/LiteralType "cpp/named req/LiteralType") variables, labels, and [ ` goto ` ](/w/cpp/l... | |
C++_Ranges_library/accumulate4_5_0.txt | From cppreference.com
< cpp | algorithm | |
C++_Ranges_library/C++_Ranges_library_153_0.txt | ##### [ cppreference.com ](/)
[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Ffeature+test "You
are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/feature_test "View the content page \[c\]")
* [ Discussion ](/w/Talk:cpp/feature_test "Discussion ... | |
C++_Ranges_library/C++_Ranges_library_58_4.txt | /ranges/view "cpp/ranges/view") and produces a view of [ tuple
](/w/cpp/utility/tuple "cpp/utility/tuple") s. ` i ` th element (the tuple)
of the resulting sequence holds:
* the value equal to ` i ` , which is a zero-based index of the element of underlying sequence, and
* the reference to the underlying elemen... | |
C++_Ranges_library/C++_Ranges_library_29_38.txt | ### Navigation
* [ Support us ](http://www.cppreference.com/support)
* [ Recent changes ](/w/Special:RecentChanges "A list of recent changes in the wiki \[r\]")
* [ FAQ ](/w/Cppreference:FAQ)
* [ Offline version ](/w/Cppreference:Archives)
##### Toolbox
* [ What links here ](/w/Special:WhatLinksHere/cpp/... | |
C++_Ranges_library/C++_Ranges_library_113_1.txt |
---
| [ range_const_reference_t range_rvalue_reference_t
range_common_reference_t ](/w/cpp/ranges/iterator_t "cpp/ranges/iterator t")
(C++23)
---
| [ elements_of ](/w/cpp/ranges/elements_of "cpp/ranges/elements of")
(C++23)
---
[ Dangling iterator handling ](/w/cpp/rang... | |
C++_Ranges_library/C++_Ranges_library_116_2.txt | cpp/ranges/join with view") (C++23) (C++23)
[ lazy_split_view views::lazy_split ](/w/cpp/ranges/lazy_split_view
"cpp/ranges/lazy split view")
[ split_view views::split ](/w/cpp/ranges/split_view "cpp/ranges/split
view")
[ views::counted ](/w/cpp/ranges/view_counted "cpp/ranges/view counted")
[ common_view... | |
C++_Ranges_library/C++_Ranges_library_73_25.txt | on "cpp/language/operator comparison") (library support); adding three-way comparison to the library | 201907L | [ ` <compare> ` ](/w/cpp/header/compare "cpp/header/compare") | (C++20) | [ P0768R1 ](https://wg21.link/P0768R1)
[ P1614R2 ](https://wg21.link/P1614R2)
` __cpp_lib_to_address ` | Utility to conv... | |
C++_Ranges_library/C++_Ranges_library_70_25.txt | on "cpp/language/operator comparison") (library support); adding three-way comparison to the library | 201907L | [ ` <compare> ` ](/w/cpp/header/compare "cpp/header/compare") | (C++20) | [ P0768R1 ](https://wg21.link/P0768R1)
[ P1614R2 ](https://wg21.link/P1614R2)
` __cpp_lib_to_address ` | Utility to conv... | |
C++_Ranges_library/C++_Ranges_library_73_4.txt | gory "cpp/language/value category") | 201606L | (C++17) | [ P0135R1 ](https://wg21.link/P0135R1)
` __cpp_hex_float ` | [ Hexadecimal floating literals ](/w/cpp/language/floating_literal "cpp/language/floating literal") | 201603L | (C++17) | [ P0245R1 ](https://wg21.link/P0245R1)
` __cpp_if_consteval ` | ... | |
C++_Ranges_library/C++_Ranges_library_84_4.txt | See also
---
### Customization point objects
The name ` views::repeat ` denotes a _customization point object_ , which is a
const [ function object ](/w/cpp/named_req/FunctionObject "cpp/named
req/FunctionObject") of a [ literal ](/w/cpp/named_req/LiteralType "cpp/named
req/LiteralType") [ ` semiregular ` ... | |
C++_Ranges_library/C++_Ranges_library_53_3.txt | 23)
template < template < class ... > class C, class ... Args >
constexpr /*range adaptor closure*/ to ( Args && ... args ) ; | (4) | (since C++23)
Helper templates | |
template < class Container >
constexpr bool /*reservable-container*/ =
[ ranges:: sized_range
](http://en.... | |
C++_Ranges_library/C++_Ranges_library_42_2.txt | unction
"cpp/named req/UnformattedOutputFunction")
---
[ Formatters ](/w/cpp/named_req#Formatters "cpp/named req")
| [ BasicFormatter ](/w/cpp/named_req/BasicFormatter "cpp/named
req/BasicFormatter") (C++20)
---
| [ Formatter ](/w/cpp/named_req/Formatter "cpp/named req/Formatter")
(C++20)
--... | |
C++_Ranges_library/C++_Ranges_library_126_12.txt | r/vector") | 201907L | [ ` <vector> ` ](/w/cpp/header/vector "cpp/header/vector") | (C++20) | [ P1004R2 ](https://wg21.link/P1004R2)
` __cpp_lib_containers_ranges ` | [ Ranges-aware ](/w/cpp/ranges/to#container_compatible_range "cpp/ranges/to") construction and insertion for containers and strings | 202202L ... | |
C++_Ranges_library/C++_Ranges_library_132_4.txt | duction guides
* 5 Notes
* 6 Example
* 7 Defect reports
* 8 See also
---
### [ [ edit
](/mwiki/index.php?title=cpp/ranges/split_view&action=edit§ion=1 "Edit
section: Data members") ] Data members
Data member | Definition
---|---
` _base__ ` (private) | The underlying [ ` view `... | |
C++_Ranges_library/C++_Ranges_library_112_1.txt | rable "cpp/utility/compare/three way
comparable") (C++20) (C++20)
[ strong_ordering ](/w/cpp/utility/compare/strong_ordering
"cpp/utility/compare/strong ordering") (C++20)
[ weak_ordering ](/w/cpp/utility/compare/weak_ordering
"cpp/utility/compare/weak ordering") (C++20)
[ partial_ordering ](/w/cpp/utility/co... | |
C++_Ranges_library/param-pack.html4_36_0.txt | If you call ` good({}) ` or ` good(Obj{}) ` , you will construct exactly one
object of type ` Obj ` . If you call ` bad({}) ` , the program is ill-formed
(the compiler doesnât know what type ` {} ` should be). If you call `
bad(Obj{}) ` , then you will construct two objects of type ` Obj ` . First,
a temporary will... | |
C++_Ranges_library/C++_Ranges_library_96_10.txt | ype
(class template) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/types/dsc_add_pointer&action=edit)
##### Other transformations
Defined in header ` [ <type_traits> ](/w/cpp/header/type_traits
"cpp/header/type traits") `
[ aligned_storage ](/w/cpp/types/aligned_storage "cp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.