id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
C++_Ranges_library/C++_Ranges_library_73_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_76_1.txt
++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 of") (C++23) --- [ Dangling iterator handlin...
C++_Ranges_library/C++_Ranges_library_59_20.txt
r_t<T>> && requires(T& t) { { [ranges::data](http://en.cppreference.com/w/cpp/ranges-ranges-placeholder/data)(t) } -> same_as<add_pointer_t<range_reference_t<T>>>; }; } #### [ [ edit ](/mwiki/index.php?title=Template:cpp/synopsis/ranges&action=edit&section=T-11 "Template:cpp/...
C++_Ranges_library/C++_Ranges_library_95_26.txt
](/w/cpp/header/tuple "cpp/header/tuple") [ ` <utility> ` ](/w/cpp/header/utility "cpp/header/utility") | (C++14) | [ N3670 ](https://wg21.link/N3670) ` __cpp_lib_type_identity ` | std::type_identity | 201806L | [ ` <type_traits> ` ](/w/cpp/header/type_traits "cpp/header/type traits") | (C++20) | [ P0887R1...
C++_Ranges_library/C++_Ranges_library_91_19.txt
cpp/algorithm/ranges/dsc_next_permutation&action=edit) [ prev_permutation ](/w/cpp/algorithm/prev_permutation "cpp/algorithm/prev permutation") | generates the next smaller lexicographic permutation of a range of elements (function template) [ [edit] ](https://en.cppreference.com/mwiki/index.php?title=Template:...
C++_Ranges_library/C++_Ranges_library_140_19.txt
github.com/wjakob/nanogui) | A minimalistic cross-platform widget library for OpenGL 3.x or higher ( [ Doc ](https://nanogui.readthedocs.io/en/latest/) ) | | [ OWLNext ](http://sourceforge.net/projects/owlnext/) | Modern update to [ OWL ](https://en.wikipedia.org/wiki/Object_Windows_Library) for writing GUI appl...
C++_Ranges_library/C++_Ranges_library_141_1.txt
` #elif ` ](/w/cpp/preprocessor/conditional "cpp/preprocessor/conditional") . It is treated as a defined macro by [ ` #ifdef ` ](/w/cpp/preprocessor/conditional "cpp/preprocessor/conditional") , [ ` #ifndef ` ](/w/cpp/preprocessor/conditional "cpp/preprocessor/conditional") , [ ` #elifdef ` ](/w/cpp/preprocessor/condi...
C++_Ranges_library/param-pack.html4_32_0.txt
Why not allow the above code? The problem lies in the fact that, for compatibility with really old C++, there are two ways of defining a C-style variadic function function: int printf(const char *, ...); // better way, required by C int printf(const char *...); // 1983 C++ way, before...
C++_Ranges_library/C++_Ranges_library_122_0.txt
##### [ cppreference.com ](/) [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Fnumeric "You are encouraged to log in; however, it is not mandatory \[o\]") ##### Namespaces * [ Page ](/w/cpp/numeric "View the content page \[c\]") * [ Discussion ](/mwiki/index.php?title=Talk:cpp/numeric&action=...
C++_Ranges_library/C++_Ranges_library_71_0.txt
##### [ cppreference.com ](/) [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges%2Fzip+transform+view "You are encouraged to log in; however, it is not mandatory \[o\]") ##### Namespaces * [ Page ](/w/cpp/ranges/zip_transform_view "View the content page \[c\]") * [ Discussion ](/mwiki/in...
C++_Ranges_library/C++_Ranges_library_36_5.txt
orrowed_range "cpp/ranges/borrowed range") * [ Русский ](http://ru.cppreference.com/w/cpp/ranges/borrowed_range "cpp/ranges/borrowed range") * [ 中文 ](http://zh.cppreference.com/w/cpp/ranges/borrowed_range "cpp/ranges/borrowed range") * This page was last modified on 13 March 2024, at 19:26. * This page has be...
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_10_0.txt
8. Discussions 9. Collectives
C++_Ranges_library/C++_Ranges_library_127_8.txt
nce.com/mwiki/index.php?title=Template:cpp/utility/dsc_expected&action=edit) Defined in header ` [ <variant> ](/w/cpp/header/variant "cpp/header/variant") ` [ variant ](/w/cpp/utility/variant "cpp/utility/variant") (C++17) | a type-safe discriminated union (class template) [ [edit] ](https://en.cppreference....
C++_Ranges_library/C++_Ranges_library_7_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_126_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_33_1.txt
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 of") (C++23) --- ...
C++_Ranges_library/C++_Ranges_library_11_18.txt
e") ) | 202306L | [ ` <type_traits> ` ](/w/cpp/header/type_traits "cpp/header/type traits") | (C++26) | [ P2641R4 ](https://wg21.link/P2641R4) ` __cpp_lib_jthread ` | [ Stop token ](/w/cpp/thread/stop_token "cpp/thread/stop token") and [ joining thread ](/w/cpp/thread/jthread "cpp/thread/jthread") | 201911L ...
C++_Ranges_library/C++_Ranges_library_116_3.txt
lements_of&action=edit&section=1 "Edit section: Template parameters") ] Template parameters R | \- | a type that satisfies [ ` range ` ](/w/cpp/ranges/range "cpp/ranges/range") ---|---|--- Allocator | \- | an allocator type that meets the requirements of [ Allocator ](/w/cpp/named_req/Allocator "cpp/name...
C++_Ranges_library/C++_Ranges_library_10_20.txt
s") | | | [ | ` contains ` --- ](/w/cpp/container/flat_set/contains "cpp/container/flat set/contains") [ | ` contains ` --- ](/w/cpp/container/flat_multiset/contains "cpp/container/flat multiset/contains") [ | ` contains ` --- ](/w/cpp/container/flat_map/contains "cpp/container/flat map/contains") [ | ` co...
C++_Ranges_library/C++_Ranges_library_70_15.txt
| Freestanding std::mdspan | 202311L | [ ` <mdspan> ` ](/w/cpp/header/mdspan "cpp/header/mdspan") | (C++26) | [ P2833R2 ](https://wg21.link/P2833R2) ` __cpp_lib_freestanding_memory ` | Freestanding facilities in [ ` <memory> ` ](/w/cpp/header/memory "cpp/header/memory") | 202306L | [ ` <memory> ` ](/w/c...
C++_Ranges_library/C++_Ranges_library_130_36.txt
or/end)(cxx11_core), add); if (print.cxx98) [std::for_each](http://en.cppreference.com/w/cpp/algorithm/for_each)([std::begin](http://en.cppreference.com/w/cpp/iterator/begin)(cxx98_core), [std::end](http://en.cppreference.com/w/cpp/iterator/end)(cxx98_core), add); [std::snprintf](http://en.cppre...
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_0_0.txt
Skip to main content Stack Overflow
C++_Ranges_library/C++_Ranges_library_10_5.txt
operations on existing iterators even if those iterators are not invalidated. 5. Elements of the same container can be modified concurrently with those member functions that are not specified to access these elements. More generally, the C++ standard library functions do not read objects indirectly accessible throu...
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_56_0.txt
Improve this answer Follow
C++_Ranges_library/C++_Ranges_library_7_0.txt
##### [ cppreference.com ](/) [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges "You are encouraged to log in; however, it is not mandatory \[o\]") ##### Namespaces * [ Page ](/w/cpp/ranges "View the content page \[c\]") * [ Discussion ](/mwiki/index.php?title=Talk:cpp/ranges&action=edi...
C++_Ranges_library/C++_Ranges_library_18_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_136_26.txt
](/w/cpp/header/tuple "cpp/header/tuple") [ ` <utility> ` ](/w/cpp/header/utility "cpp/header/utility") | (C++14) | [ N3670 ](https://wg21.link/N3670) ` __cpp_lib_type_identity ` | std::type_identity | 201806L | [ ` <type_traits> ` ](/w/cpp/header/type_traits "cpp/header/type traits") | (C++20) | [ P0887R1...
C++_Ranges_library/C++_Ranges_library_73_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_11_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/param-pack.html4_18_0.txt
constexpr int sum(std::convertible_to<int> auto ...il) { int r = 0; for (int i : { int(il)... }) r += i; return r; } template<int ...N> struct Nested { static constexpr int nested_sum(auto ...v) { ...
C++_Ranges_library/C++_Ranges_library_56_22.txt
0) [ ` is_lteq() ` ](/w/cpp/utility/compare/named_comparison_functions "cpp/utility/compare/named comparison functions") (since C++20) [ ` is_lvalue_reference ` ](/w/cpp/types/is_lvalue_reference "cpp/types/is lvalue reference") <> (since C++11) [ ` is_lvalue_reference_v ` ](/w/cpp/types/is_lvalue_reference "cpp/...
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_53_0.txt
Here is an example of using it: int n; std::cout << "n? "; { std::string s; getline( std::cin, s ); auto x = string_to <int> ( s ); if (!x) return complain(); n = *x; } std::cout << "Multiply that by seven to get " << (7 * n) << ".\n";
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_82_0.txt
Sep 10, 2013 at 21:20 Add a comment |
C++_Ranges_library/C++_Ranges_library_73_34.txt
COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_not_fn) COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_out_ptr) COMPILER_FEATURE_ENTRY(202311L, __cpp_lib_ranges_as_const) COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_ratio) COMPILER_FEATURE_ENTRY(202306L, __cpp_lib_rcu) COMPILER_FEATURE...
C++_Ranges_library/param-pack.html4_90_0.txt
* * * 1. The fact that ` auto&& ` produces forwarding references is not mentioned in the definition of forwarding references, but follows from the fact that type deduction for ` auto ` follows the same rules as templates. ↩︎
C++_Ranges_library/C++_Ranges_library_99_18.txt
p/string/basic_string/starts_with "cpp/string/basic string/starts with") / [ ` ends_with ` ](/w/cpp/string/basic_string_view/ends_with "cpp/string/basic string view/ends with") | [ P0457R2 ](https://wg21.link/P0457R2) | 9 | 6 | 19.21* | 10.0.0* | | | Library support for [ ` operator<=> ` ](/w/cpp/language...
C++_Ranges_library/C++_Ranges_library_27_7.txt
ent link to this revision of the page") * [ Page information ](/mwiki/index.php?title=cpp/ranges/drop_view&action=info) * In other languages * [ Deutsch ](http://de.cppreference.com/w/cpp/ranges/drop_view "cpp/ranges/drop view") * [ Español ](http://es.cppreference.com/w/cpp/ranges/drop_view "cpp/ranges/drop...
C++_Ranges_library/C++_Ranges_library_139_14.txt
ru.cppreference.com/w/cpp/ranges "cpp/ranges") * [ 中文 ](http://zh.cppreference.com/w/cpp/ranges "cpp/ranges") * This page was last modified on 23 March 2024, at 06:26. * This page has been accessed 999,598 times. * [ Privacy policy ](/w/Cppreference:Privacy_policy "Cppreference:Privacy policy") * [ About ...
C++_Ranges_library/C++_Ranges_library_155_5.txt
s [ ` input_iterator ` ](/w/cpp/iterator/input_iterator "cpp/iterator/input iterator") (concept) [ [edit] ](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_input_range&action=edit) [ ranges::output_range ](/w/cpp/ranges/output_range "cpp/ranges/output range") (C++20) | specifies a ran...
C++_Ranges_library/C++_Ranges_library_59_37.txt
t only // when !is_reference_v<InnerRng>   Pattern pattern_ = Pattern(); // exposition only   // class template join_with_view::iterator template<bool Const> struct iterator; // exposition only   // class template join_w...
C++_Ranges_library/param-pack.html4_10_0.txt
* In line 10, we again expand ` c ` in an initializer list. In most cases, an expanded pattern is conceptually equivalent to a number of copies of the pattern equal to the size of the parameter pack. Unless otherwise noted, a pattern is expanded by appending an ellipsis ( ` ... ` ). It is illegal to use a captured ...
C++_Ranges_library/C++_Ranges_library_16_0.txt
##### [ cppreference.com ](/) [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges%2Ftake+while+view "You are encouraged to log in; however, it is not mandatory \[o\]") ##### Namespaces * [ Page ](/w/cpp/ranges/take_while_view "View the content page \[c\]") * [ Discussion ](/mwiki/index.ph...
C++_Ranges_library/C++_Ranges_library_67_12.txt
ator \- > ( ) ; } ) ; | (2) | ( exposition only* ) template < class T, class U > concept /* different-from */ = ! [ std:: same_as ](http://en.cppreference.com/w/cpp/concepts/same_as) < [ std:: remove_cvref_t ](http://en.cppreference.com/w/cpp/types/remove_cvref) < T > , [ std:: remove_...
C++_Ranges_library/C++_Ranges_library_59_7.txt
ew "cpp/ranges/view") consisting of the elements obtained by successive application of ` operator>> ` on the associated input stream (class template) (customization point object) [ [edit] ](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_basic_istream_view&action=edit) [ ranges::repeat_...
C++_Ranges_library/C++_Ranges_library_32_29.txt
?title=cpp/header/iterator&oldid=170799) " ##### 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 * [ W...
C++_Ranges_library/C++_Ranges_library_86_4.txt
imes. * [ Privacy policy ](/w/Cppreference:Privacy_policy "Cppreference:Privacy policy") * [ About cppreference.com ](/w/Cppreference:About "Cppreference:About") * [ Disclaimers ](/w/Cppreference:General_disclaimer "Cppreference:General disclaimer") * [ ![Powered by MediaWiki](/mwiki/skins/common/images/powe...
C++_Ranges_library/param-pack.html4_38_0.txt
# Idioms Below is a collection of idioms for working with parameter packs. I place all the code in this blog post in the public domain, so feel free to cut and paste. To keep things concise, I’ve omitted include files, but the system library features used in the examples come from the following set of includes:
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_84_0.txt
#include <iostream> using namespace std; int main (){ int firstvariable; int secondvariable; float float1; float float2; cout << "Please enter two integers and then press Enter:" << endl; cin >> firstvariable; cin >> secondvariable; if(firstvaria...
C++_Ranges_library/C++_Ranges_library_24_2.txt
+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 views::common ](/w/cpp/range...
C++_Ranges_library/C++_Ranges_library_109_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_31_26.txt
](/w/cpp/header/tuple "cpp/header/tuple") [ ` <utility> ` ](/w/cpp/header/utility "cpp/header/utility") | (C++14) | [ N3670 ](https://wg21.link/N3670) ` __cpp_lib_type_identity ` | std::type_identity | 201806L | [ ` <type_traits> ` ](/w/cpp/header/type_traits "cpp/header/type traits") | (C++20) | [ P0887R1...
C++_Ranges_library/C++_Ranges_library_18_0.txt
##### [ cppreference.com ](/) [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges "You are encouraged to log in; however, it is not mandatory \[o\]") ##### Namespaces * [ Page ](/w/cpp/ranges "View the content page \[c\]") * [ Discussion ](/mwiki/index.php?title=Talk:cpp/ranges&action=edi...
C++_Ranges_library/C++_Ranges_library_56_43.txt
ninitialized_value_construct_n<>() ` ](/w/cpp/memory/uninitialized_value_construct_n "cpp/memory/uninitialized value construct n") (since C++17) [ ` unique<>() ` ](/w/cpp/algorithm/unique "cpp/algorithm/unique") [ ` unique_copy<>() ` ](/w/cpp/algorithm/unique_copy "cpp/algorithm/unique copy") [ ` unique_lock ` ](...
C++_Ranges_library/C++_Ranges_library_25_2.txt
/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") | [ revers...
C++_Ranges_library/C++_Ranges_library_150_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_51_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/accumulate4_12_0.txt
* 1 Parameters * 2 Return value * 3 Possible implementation * 4 Notes * 5 Example * 6 Defect reports * 7 See also --- ### [ edit ] Parameters
C++_Ranges_library/C++_Ranges_library_57_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_59_8.txt
nges/dsc_take_while_view&action=edit) [ ranges::drop_view views::drop ](/w/cpp/ranges/drop_view "cpp/ranges/drop view") (C++20) | a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") consisting of elements of another [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") , skipping the first N elements (class temp...
C++_Ranges_library/C++_Ranges_library_42_1.txt
Type ](/w/cpp/named_req/ImplicitLifetimeType "cpp/named req/ImplicitLifetimeType") [ Library-Wide ](/w/cpp/named_req#Library-wide "cpp/named req") | [ EqualityComparable ](/w/cpp/named_req/EqualityComparable "cpp/named req/EqualityComparable") --- [ LessThanComparable ](/w/cpp/named_req/LessThanComparabl...
C++_Ranges_library/C++_Ranges_library_99_22.txt
r") | [ P1135R6 ](https://wg21.link/P1135R6) | 11 | 11 | 19.28 (16.8)* | 13.1.6* | | | [ ` std::source_location ` ](/w/cpp/utility/source_location "cpp/utility/source location") | [ P1208R6 ](https://wg21.link/P1208R6) | 11 | 15* (partial) 16 | 19.29 (16.10)* | 15.0.0* | | | Adding [ `...
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_110_0.txt
Sign up using Email and Password Submit
C++_Ranges_library/C++_Ranges_library_110_5.txt
s [ ` input_iterator ` ](/w/cpp/iterator/input_iterator "cpp/iterator/input iterator") (concept) [ [edit] ](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_input_range&action=edit) [ ranges::output_range ](/w/cpp/ranges/output_range "cpp/ranges/output range") (C++20) | specifies a ran...
C++_Ranges_library/C++_Ranges_library_9_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_123_0.txt
##### [ cppreference.com ](/) [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges%2Fviewable+range "You are encouraged to log in; however, it is not mandatory \[o\]") ##### Namespaces * [ Page ](/w/cpp/ranges/viewable_range "View the content page \[c\]") * [ Discussion ](/mwiki/index.php?...
C++_Ranges_library/C++_Ranges_library_109_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_25_3.txt
view:: _sentinel_ ::base ](/w/cpp/ranges/take_view/sentinel/base "cpp/ranges/take view/sentinel/base") [ operator== (std::counted_iterator,take_view:: _sentinel_ ) ](/w/cpp/ranges/take_view/sentinel/operator_cmp "cpp/ranges/take view/sentinel/operator cmp") [ [edit] ](https://en.cppreference.com/mwiki/index.ph...
C++_Ranges_library/C++_Ranges_library_71_7.txt
//en.cppreference.com/w/cpp/io/cout) << rem << '{'; for (char o[]{0,' ',0}; auto const& e : r) [std::cout](http://en.cppreference.com/w/cpp/io/cout) << o << e, *o = ','; [std::cout](http://en.cppreference.com/w/cpp/io/cout) << "}\n"; }   int main() { auto v1 = [std::...
C++_Ranges_library/C++_Ranges_library_124_3.txt
n_and_conversion "cpp/locale") [ ` text_encoding ` ](/mwiki/index.php?title=cpp/locale/text_encoding&action=edit&redlink=1 "cpp/locale/text encoding \(page does not exist\)") (C++26) **[ Input/output library ](/w/cpp/io "cpp/io") ** [ Print functions ](/w/cpp/io#Print_functions "cpp/io") (C++23) [ Stream-based I/O...
C++_Ranges_library/C++_Ranges_library_80_2.txt
/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") | [ revers...
C++_Ranges_library/C++_Ranges_library_18_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/param-pack.html4_0_0.txt
←Index View as PDF
C++_Ranges_library/C++_Ranges_library_126_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_140_28.txt
icient run-time mathematical expression parser and evaluation engine. ExprTk supports numerous forms of functional, logical and vector processing semantics and is very easily extendible. | [ MIT ](https://opensource.org/licenses/MIT) | header-only [ GiNaC ](https://www.ginac.de/) | A library for creating integra...
C++_Ranges_library/C++_Ranges_library_137_2.txt
plit 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_view views::reverse ](/w/cpp/ranges/re...
C++_Ranges_library/param-pack.html4_35_0.txt
A workaround for ` f2 ` is to use a cast in the pattern for expanding ` i ` , as in ` for (int n : { int(i)... }) ` . This solution is perfectly fine for ` int ` . Unfortunately, for types with non-trivial constructors, such as ` std::string ` , ` f2 ` can lead to gratuitous copies. For example, suppose that instead of...
C++_Ranges_library/C++_Ranges_library_123_3.txt
.com/w/cpp/concepts/movable) < [ std:: remove_reference_t ](http://en.cppreference.com/w/cpp/types/remove_reference) < T >> && ! /*is-initializer-list*/ < T > ) ) ) ) ; | | (since C++20) | | The ` viewable_range ` concept is a refinement of [ ` range ` ](/w/cpp/ranges/range "cpp/ranges/range") th...
C++_Ranges_library/C++_Ranges_library_109_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_10_29.txt
sic_string_view ](/w/cpp/string/basic_string_view "cpp/string/basic string view") (C++17) | read-only string view (class template) [ [edit] ](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/string/dsc_basic_string_view&action=edit) Retrieved from " [ https://en.cppreference.com/mwiki/index.ph...
C++_Ranges_library/C++_Ranges_library_74_1.txt
reakpoint ](/w/cpp/utility/breakpoint "cpp/utility/breakpoint") (C++26) [ Three-way comparison ](/w/cpp/utility#Three-way_comparison "cpp/utility") [ three_way_comparable three_way_comparable_with ](/w/cpp/utility/compare/three_way_comparable "cpp/utility/compare/three way comparable") (C++20) (C++20) [ strong...
C++_Ranges_library/C++_Ranges_library_44_12.txt
ator \- > ( ) ; } ) ; | (2) | ( exposition only* ) template < class T, class U > concept /* different-from */ = ! [ std:: same_as ](http://en.cppreference.com/w/cpp/concepts/same_as) < [ std:: remove_cvref_t ](http://en.cppreference.com/w/cpp/types/remove_cvref) < T > , [ std:: remove_...
C++_Ranges_library/C++_Ranges_library_59_12.txt
it section: Synopsis") ] Synopsis #include <compare> #include <initializer_list> #include <iterator>   namespace std::ranges { inline namespace /* unspecified */ { // range access inline constexpr /* unspecified */ begin = /* unspecified */; // freestanding ...
C++_Ranges_library/accumulate4_16_0.txt
### [ edit ] Example Run this code
C++_Ranges_library/C++_Ranges_library_38_4.txt
ges::view_interface ](/w/cpp/ranges/view_interface "cpp/ranges/view interface") [ empty ](/w/cpp/ranges/view_interface/empty "cpp/ranges/view interface/empty") (C++20) | returns whether the derived view is empty. Provided if it satisfies [ ` sized_range ` ](/w/cpp/ranges/sized_range "cpp/ranges/sized range") or...
C++_Ranges_library/what-will-be-the-output-of-the-following-c-code--5ab8a41bc56b6664bc9bacdd8_15_0.txt
FREE Demo Classes Available*
C++_Ranges_library/C++_Ranges_library_81_2.txt
23) ** lazy_split_view views::lazy_split ** [ 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_view...
C++_Ranges_library/C++_Ranges_library_91_14.txt
"cpp/algorithm/is sorted") (C++11) | checks whether a range is sorted into ascending order (function template) [ [edit] ](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/algorithm/dsc_is_sorted&action=edit) [ ranges::is_sorted ](/w/cpp/algorithm/ranges/is_sorted "cpp/algorithm/ranges/is sorted"...
C++_Ranges_library/C++_Ranges_library_114_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/checking-cin-input-stream-produces-an-integer9_81_0.txt
* Correct. I left that for the OP to figure out, but I suppose it should be added for clarity. – Zac Howland
C++_Ranges_library/what-will-be-the-output-of-the-following-c-code--5ab8a41bc56b6664bc9bacdd8_8_0.txt
printf("%d", i); i++;
C++_Ranges_library/C++_Ranges_library_40_3.txt
or_ :: _outer-iterator_ ](/w/cpp/ranges/chunk_view/outer_iterator/outer_iterator "cpp/ranges/chunk view/outer iterator/outer iterator") [ chunk_view:: _outer-iterator_ ::operator= ](/w/cpp/ranges/chunk_view/outer_iterator/operator%3D "cpp/ranges/chunk view/outer iterator/operator=") [ chunk_view:: _outer-iterator_ ...
C++_Ranges_library/C++_Ranges_library_6_2.txt
string "cpp/header/string") ` --- Type | Definition ` **std::string** ` | [ std:: basic_string ](http://en.cppreference.com/w/cpp/string/basic_string) < char > ` **std::wstring** ` | [ std:: basic_string ](http://en.cppreference.com/w/cpp/string/basic_string) < wchar_t > ` **std::u8string** ` (sinc...
C++_Ranges_library/C++_Ranges_library_99_14.txt
| | | | | 20.7 | 12.0 ADL and function templates that are not visible | [ P0846R0 ](https://wg21.link/P0846R0) | 9 | 9 | 19.21* | 11.0.3* | 5.1 | 2021.1 | | | | | | 11.0 | 20.7 | 12.0 DR11: Specify when ` constexpr ` function definitions are [ needed for constant evaluation ](/w/cpp...
C++_Ranges_library/C++_Ranges_library_126_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_70_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_7_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_23_4.txt
he size of a range (customization point object) [ [edit] ](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_ssize&action=edit) [ ranges::empty ](/w/cpp/ranges/empty "cpp/ranges/empty") (C++20) | checks whether a range is empty (customization point object) [ [edit] ](https://en.cppr...
C++_Ranges_library/C++_Ranges_library_110_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_57_18.txt
e") ) | 202306L | [ ` <type_traits> ` ](/w/cpp/header/type_traits "cpp/header/type traits") | (C++26) | [ P2641R4 ](https://wg21.link/P2641R4) ` __cpp_lib_jthread ` | [ Stop token ](/w/cpp/thread/stop_token "cpp/thread/stop token") and [ joining thread ](/w/cpp/thread/jthread "cpp/thread/jthread") | 201911L ...
C++_Ranges_library/C++_Ranges_library_143_1.txt
ion "cpp/language/main function") function _freestanding_ | _hosted_ ---|--- In a _freestanding_ implementation, it is implementation-defined whether a program is required to define a [ ` main ` ](/w/cpp/language/main_function "cpp/language/main function") function. Start-up and termination is implementation-defi...