id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
C++_Ranges_library/C++_Ranges_library_109_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/C++_Ranges_library_59_6.txt | ## Range primitives
Defined in namespace ` std::ranges `
[ ranges::iterator_t ranges::const_iterator_t ranges::sentinel_t ranges::const_sentinel_t ranges::range_difference_t ranges::range_size_t ranges::range_value_t ranges::range_reference_t ranges::range_const_reference_t ranges::range_rvalue_referen... | |
C++_Ranges_library/C++_Ranges_library_3_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_56_20.txt | _argument ` ](/w/cpp/error/invalid_argument "cpp/error/invalid
argument")
[ ` invocable ` ](/w/cpp/concepts/invocable "cpp/concepts/invocable") <>
(since C++20)
[ ` invoke<>() ` ](/w/cpp/utility/functional/invoke
"cpp/utility/functional/invoke") (since C++17)
[ ` invoke_r<>() ` ](/w/cpp/utility/functional/invoke
... | |
C++_Ranges_library/C++_Ranges_library_116_4.txt | Upload file ](http://upload.cppreference.com/w/Special:Upload "Upload files \[u\]")
* [ Special pages ](/w/Special:SpecialPages "A list of all special pages \[q\]")
* [ Printable version ](/mwiki/index.php?title=cpp/ranges/elements_of&printable=yes "Printable version of this page \[p\]")
* [ Permanent link ](/mwi... | |
C++_Ranges_library/C++_Ranges_library_73_29.txt | cxx14_lib[] = {
COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_chrono_udls)
COMPILER_FEATURE_ENTRY(201309L, __cpp_lib_complex_udls)
COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_exchange_function)
COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_generic_associative_lookup)
COMPILER_FEATURE_ENTRY... | |
C++_Ranges_library/C++_Ranges_library_140_16.txt | timedia
Library | Description | License | Configuration
---|---|---|---
[ Kigs-framework ](https://github.com/Kigs-framework/kigs) | A modular multi-purpose cross-platform framework | MIT |
[ openFrameworks ](https://www.openframeworks.cc/) | | MIT |
[ SDL ](https://www.libsdl.org/) | **S** im... | |
C++_Ranges_library/accumulate4_14_0.txt | ### [ edit ] Possible implementation
accumulate (1)
---
template<class InputIt, class T>
constexpr // since C++20
T accumulate(InputIt first, InputIt last, T init)
{
for (; first != last; ++first)
init = std::move(init) + *first; // std::move since C++20
... | |
C++_Ranges_library/C++_Ranges_library_2_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/checking-cin-input-stream-produces-an-integer9_73_0.txt | – jpenna
Feb 5, 2018 at 1:59 | |
C++_Ranges_library/accumulate4_18_0.txt |
sum: 55
product: 3628800
dash-separated string: 1-2-3-4-5-6-7-8-9-10
dash-separated string (right-folded): 10-9-8-7-6-5-4-3-2-1
### [ edit ] Defect reports | |
C++_Ranges_library/C++_Ranges_library_74_7.txt | andle ](http://en.cppreference.com/w/cpp/coroutine/coroutine_handle) < promise_type >
( exposition-only member object* )
### [ [ edit
](/mwiki/index.php?title=cpp/coroutine/generator&action=edit§ion=4 "Edit
section: Member functions") ] Member functions
[ (constructor) ](/w/cpp/coroutine/generator/g... | |
C++_Ranges_library/C++_Ranges_library_59_41.txt | qual_to](http://en.cppreference.com/w/cpp/ranges-functional-placeholder/equal_to)>
&&
(forward_range<V> || __tiny_range<Pattern>)
template<bool Const>
struct lazy_split_view<V, Pattern>::__outer_iterator<Const>::value_type
: view_interface<value_type> {
privat... | |
C++_Ranges_library/C++_Ranges_library_64_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_70_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_78_5.txt | er/cstddef") | [ ` <time.h> ` ](/w/cpp/header/ctime "cpp/header/ctime")
[ ` <errno.h> ` ](/w/cpp/header/cerrno "cpp/header/cerrno") | [ ` <math.h> ` ](/w/cpp/header/cmath "cpp/header/cmath") | [ ` <stdio.h> ` ](/w/cpp/header/cstdio "cpp/header/cstdio") | [ ` <wchar.h> ` ](/w/cpp/header/cwchar "cpp/header/cwchar")... | |
C++_Ranges_library/C++_Ranges_library_82_1.txt | arch_operations "cpp/algorithm")
| [ all_of any_of none_of ](/w/cpp/algorithm/all_any_none_of
"cpp/algorithm/all any none of") (C++11) (C++11) (C++11)
---
[ count count_if ](/w/cpp/algorithm/count "cpp/algorithm/count")
[ mismatch ](/w/cpp/algorithm/mismatch "cpp/algorithm/mismatch")
[ equal ](/w/cp... | |
C++_Ranges_library/C++_Ranges_library_57_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/param-pack.html4_76_0.txt | In ` good1 ` , we need to construct a new ` Obj ` from the reference function
argument in all cases except when the argument was a temporary object (i.e., `
good1(Obj{}) ` ). When the argument was a temporary, the inferred type ` T `
is ` Obj ` (meaning argument ` t ` has type ` Obj&& ` ). If the argument was a
variabl... | |
C++_Ranges_library/C++_Ranges_library_14_2.txt |
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/locale/navbar_content&action=edit)
The locale facility includes internationalization support for character
classification and string collation, numeric, monetary, and date/time
formatting and parsing, and message retrieva... | |
C++_Ranges_library/C++_Ranges_library_70_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/C++_Ranges_library_29_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_3_29.txt | cxx14_lib[] = {
COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_chrono_udls)
COMPILER_FEATURE_ENTRY(201309L, __cpp_lib_complex_udls)
COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_exchange_function)
COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_generic_associative_lookup)
COMPILER_FEATURE_ENTRY... | |
C++_Ranges_library/param-pack.html4_72_0.txt | To understand the implementation and use of ` local_copy ` , you need to know
a bunch of things about C++ value categories :
* When a function argument is a forwarding reference , as in ` template<typename T> void f(T &&t) ` , the type ` T ` will be an lvalue reference (e.g., ` Type& ` ) if ` f ` was invoked wit... | |
C++_Ranges_library/C++_Ranges_library_56_28.txt | p/numeric/random/lognormal distribution") <> (since C++11)
[ ` longjmp() ` ](/w/cpp/utility/program/longjmp
"cpp/utility/program/longjmp")
[ ` lower_bound<>() ` ](/w/cpp/algorithm/lower_bound "cpp/algorithm/lower
bound")
[ ` lrint() ` ](/w/cpp/numeric/math/rint "cpp/numeric/math/rint") (since
C++11)
[ ` lrintf(... | |
C++_Ranges_library/C++_Ranges_library_11_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/C++_Ranges_library_136_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_64_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_3_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/C++_Ranges_library_128_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_149_3.txt | rface/operator at")
[ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/view_interface/navbar_content&action=edit)
Defined in header ` [ <ranges> ](/w/cpp/header/ranges "cpp/header/ranges") ` | |
---|---|---
template < class D >
requires [ std:: is_class_v
](http://en.cppr... | |
C++_Ranges_library/C++_Ranges_library_23_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_31_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_130_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/what-will-be-the-output-of-the-following-c-code--5ab8a41bc56b6664bc9bacdd8_47_0.txt | Suggested Exams
TANGEDCO Assistant Engineer | |
C++_Ranges_library/C++_Ranges_library_18_9.txt | ](/w/cpp/ranges/adjacent_view "cpp/ranges/adjacent view") (C++23) | a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") consisting of tuples of references to adjacent elements of the adapted view
(class template) (range adaptor object) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/r... | |
C++_Ranges_library/C++_Ranges_library_26_2.txt | w 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/ranges/common... | |
C++_Ranges_library/C++_Ranges_library_37_1.txt | r 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_18_7.txt | [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_owning_view&action=edit)
[ ranges::filter_view views::filter ](/w/cpp/ranges/filter_view "cpp/ranges/filter view") (C++20) | a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") that consists of the elements of a [ ` range ` ](... | |
C++_Ranges_library/C++_Ranges_library_16_5.txt | _view&action=edit§ion=2
"Edit section: Deduction guides") ] [ Deduction guides
](/w/cpp/ranges/take_while_view/deduction_guides "cpp/ranges/take while
view/deduction guides")
### [ [ edit
](/mwiki/index.php?title=cpp/ranges/take_while_view&action=edit§ion=3
"Edit section: Nested classes") ] Nested classes
... | |
C++_Ranges_library/C++_Ranges_library_91_21.txt | cppreference.com/mwiki/index.php?title=Template:cpp/memory/ranges/dsc_uninitialized_fill_n&action=edit)
[ uninitialized_move ](/w/cpp/memory/uninitialized_move "cpp/memory/uninitialized move") (C++17) | moves a range of objects to an uninitialized area of memory
(function template) [ [edit]
](https://en.cppref... | |
C++_Ranges_library/C++_Ranges_library_139_1.txt | ](/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/ranges#Dangling_iterator_handling
"cpp/ranges")
| [ dangling ](/w/cpp/ranges/dangling "cpp/... | |
C++_Ranges_library/what-will-be-the-output-of-the-following-c-code--5ab8a41bc56b6664bc9bacdd8_3_0.txt | Download Solution PDF
# | |
C++_Ranges_library/accumulate4_19_0.txt | The following behavior-changing defect reports were applied retroactively to
previously published C++ standards.
DR | Applied to | Behavior as published | Correct behavior
---|---|---|---
LWG 242 | C++98 | op could not have side effects | it cannot modify the ranges involved
LWG 2055
( P0616R0 ... | |
C++_Ranges_library/C++_Ranges_library_10_3.txt | keys, sorted by keys
(class template) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/container/dsc_flat_multiset&action=edit)
[ flat_multimap ](/w/cpp/container/flat_multimap "cpp/container/flat multimap") (C++23) | adapts two containers to provide a collection of key-value pairs, s... | |
C++_Ranges_library/C++_Ranges_library_95_28.txt | xpect },
#endif
#define COMPILER_SPECIFIC_STRING(value) #value
#define COMPILER_SPECIFIC_ENTRY(name) { #name, COMPILER_SPECIFIC_STRING(name) },
class CompilerFeature
{
char const* name_; long data_; long std_;
public:
constexpr CompilerFeature(char const* name, long d... | |
C++_Ranges_library/C++_Ranges_library_32_28.txt | = basic_istream<CharT, Traits>;
class proxy; // exposition only
constexpr istreambuf_iterator() noexcept;
constexpr istreambuf_iterator(default_sentinel_t) noexcept;
istreambuf_iterator(const istreambuf_iterator&) noexcept = default;
~is... | |
C++_Ranges_library/C++_Ranges_library_95_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/checking-cin-input-stream-produces-an-integer9_79_0.txt | answered Sep 10, 2013 at 21:14
Zac Howland Zac Howland | |
C++_Ranges_library/C++_Ranges_library_153_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_132_5.txt | not empty. Provided if [ ranges::empty ](/w/cpp/ranges/empty "cpp/ranges/empty") is applicable to it.
(public member function of ` std::ranges::view_interface<D> ` ) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/view_interface/dsc_operator_bool&action=edit)
[ front ](/w/cpp/r... | |
C++_Ranges_library/accumulate4_13_0.txt | first, last | \- | the range of elements to sum
---|---|---
init | \- | initial value of the sum
op | \- | binary operation function object that will be applied.
The signature of the function should be equivalent to the following: Ret fun
( const Type1 & a, const Type2 & b ) ; The signa... | |
C++_Ranges_library/C++_Ranges_library_150_31.txt | 01907L, __cpp_lib_barrier)
COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_bind_front)
COMPILER_FEATURE_ENTRY(201806L, __cpp_lib_bit_cast)
COMPILER_FEATURE_ENTRY(201907L, __cpp_lib_bitops)
COMPILER_FEATURE_ENTRY(201902L, __cpp_lib_bounded_array_traits)
COMPILER_FEATURE_ENTRY(201907L, _... | |
C++_Ranges_library/C++_Ranges_library_127_9.txt | tring converters ](/w/cpp/string/byte#Conversions_to_numeric_formats
"cpp/string/byte") , the header [ ` <charconv> ` ](/w/cpp/header/charconv
"cpp/header/charconv") provides light-weight, locale-independent, non-
allocating, non-throwing parsers and formatters for arithmetic types.
Defined in header ` [ <charconv> ](... | |
C++_Ranges_library/C++_Ranges_library_32_9.txt | p/iterator/dsc_ostreambuf_iterator&action=edit)
### Customization point objects
Defined in namespace ` std::ranges `
[ iter_move ](/w/cpp/iterator/ranges/iter_move "cpp/iterator/ranges/iter move") (C++20) | casts the result of dereferencing an object to its associated rvalue reference type
(customiza... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_39_0.txt | edited Nov 23, 2017 at 14:57
answered Sep 10, 2013 at 21:09 | |
C++_Ranges_library/param-pack.html4_13_0.txt | * In lambda capture lists , the pattern expansion is equivalent to a comma-separated list of captures. E.g.,
void
f(auto...arg)
{
auto with_copy = [arg...]{
/* do something with arg... */
};
with_copy();
auto with_reference =... | |
C++_Ranges_library/C++_Ranges_library_117_0.txt | ##### [ cppreference.com ](/)
[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges%2Fadjacent+view
"You are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/ranges/adjacent_view "View the content page \[c\]")
* [ Discussion ](/mwiki/index.php?ti... | |
C++_Ranges_library/param-pack.html4_61_0.txt | ## Multilambda
Thus far, weâve been writing generic lambdas in functions like ` tuple_add
` that use overloaded syntax like the ` + ` operator to add numbers of
different types. However, what if we want to write different (non-generic)
lambdas for different types? We can implement a new variadic template type, `
m... | |
C++_Ranges_library/C++_Ranges_library_102_3.txt | /filter_view/iterator#base
"cpp/ranges/filter view/iterator")
[ filter_view:: _iterator_ ::operator* filter_view:: _iterator_ ::operator->
](/w/cpp/ranges/filter_view/iterator#dereference "cpp/ranges/filter
view/iterator")
[ filter_view:: _iterator_ ::operator++
filter_view:: _iterator_ ::operator++ (int)
](/w/... | |
C++_Ranges_library/C++_Ranges_library_2_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_56_12.txt | w/cpp/numeric/math/div "cpp/numeric/math/div")
[ ` div_t ` ](/w/cpp/numeric/math/div "cpp/numeric/math/div")
[ ` divides ` ](/w/cpp/utility/functional/divides
"cpp/utility/functional/divides") <>
[ ` domain_error ` ](/w/cpp/error/domain_error "cpp/error/domain error")
[ ` double_t ` ](/w/cpp/numeric/math "cpp/n... | |
C++_Ranges_library/C++_Ranges_library_59_11.txt | /rend") (C++20) | returns a reverse end iterator to a range
(customization point object) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_rend&action=edit)
[ ranges::crbegin ](/w/cpp/ranges/crbegin "cpp/ranges/crbegin") (C++20) | returns a reverse iterator to a read-only r... | |
C++_Ranges_library/C++_Ranges_library_65_0.txt | ##### [ cppreference.com ](/)
[ Create account
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges-
ranges-&type=signup)
* [ Log in ](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges-ranges- "You are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Pag... | |
C++_Ranges_library/C++_Ranges_library_140_15.txt | |
[ muparser ](https://beltoforion.de/en/muparser/) | An extensible high performance math expression parser library written in C++. | BSD-2-Clause | cmake
[ PythonQt ](http://pythonqt.sourceforge.net/) | A dynamic Python binding for the Qt framework. It offers an easy way to embed the Python scripting lan... | |
C++_Ranges_library/what-will-be-the-output-of-the-following-c-code--5ab8a41bc56b6664bc9bacdd8_49_0.txt | TANGEDCO Assistant Engineer Important Links
## More Programming and Data Structure Questions | |
C++_Ranges_library/C++_Ranges_library_40_0.txt | ##### [ cppreference.com ](/)
[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges%2Fchunk+view
"You are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/ranges/chunk_view "View the content page \[c\]")
* [ Discussion ](/mwiki/index.php?title=Ta... | |
C++_Ranges_library/C++_Ranges_library_101_8.txt | acent transform view")
* [ 日本語 ](http://ja.cppreference.com/w/cpp/ranges/adjacent_transform_view "cpp/ranges/adjacent transform view")
* [ Português ](http://pt.cppreference.com/w/cpp/ranges/adjacent_transform_view "cpp/ranges/adjacent transform view")
* [ Русский ](http://ru.cppreference.com/w/cpp/ranges/adjacen... | |
C++_Ranges_library/what-will-be-the-output-of-the-following-c-code--5ab8a41bc56b6664bc9bacdd8_42_0.txt | Q6. Character variable in “C” language can store at a time -
Q7. “C” is a | |
C++_Ranges_library/param-pack.html4_25_0.txt | When the parameter pack is empty (has size 0), a binary fold is equivalent to
` e ` . A unary fold over an empty parameter pack is only permitted for 3
specific binary operators:
* If â is ` && ` , then an empty unary fold is equivalent to ` true ` .
* If â is ` || ` , then an empty unary fold is equivale... | |
C++_Ranges_library/C++_Ranges_library_27_5.txt | rator to the beginning 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_cbegin&action=edit)
[ cend ](/w/cpp/ranges/view_interface/cend "cpp/ranges/view interface/cend") (C++23) | ret... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_89_0.txt | Share
Improve this answer | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_130_0.txt | 1012
How to trim a std::string? | |
C++_Ranges_library/param-pack.html4_85_0.txt |
namespace detail {
template<std::size_t I, typename R, typename F>
inline constexpr R with_integral_constant(F f)
{
return static_cast<F>(f)(std::integral_constant<std::size_t, I>{});
}
} // namespace detail
template<std::size_t N, typename R = void, typename F... | |
C++_Ranges_library/C++_Ranges_library_33_4.txt | t can be safely returned without danger of dangling
(concept) [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_borrowed_range&action=edit)
Retrieved from " [
https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/dangling&oldid=133771
](https://en.cppreference.com/mwik... | |
C++_Ranges_library/C++_Ranges_library_150_29.txt | cxx14_lib[] = {
COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_chrono_udls)
COMPILER_FEATURE_ENTRY(201309L, __cpp_lib_complex_udls)
COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_exchange_function)
COMPILER_FEATURE_ENTRY(201304L, __cpp_lib_generic_associative_lookup)
COMPILER_FEATURE_ENTRY... | |
C++_Ranges_library/C++_Ranges_library_29_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/C++_Ranges_library_69_6.txt | st 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/ref_view "A list of all wiki pages that link here \[j\]")
* [ Related changes ](/w/Special:RecentChangesLinked/cpp/ra... | |
C++_Ranges_library/C++_Ranges_library_40_2.txt | ++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/ranges/common... | |
C++_Ranges_library/C++_Ranges_library_64_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_57_24.txt | 21.link/P1227R2)
` __cpp_lib_sstream_ from_string_view ` | Interfacing [ std::stringstream ](/w/cpp/io/basic_stringstream "cpp/io/basic stringstream") s with [ std::string_view ](/w/cpp/string/basic_string_view "cpp/string/basic string view") | 202306L | [ ` <sstream> ` ](/w/cpp/header/sstream "cpp/header/sstr... | |
C++_Ranges_library/C++_Ranges_library_37_5.txt |
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/view_interface/dsc_front&action=edit)
[ back ](/w/cpp/ranges/view_interface/back "cpp/ranges/view interface/back") (C++20) | returns the last element in the derived view. Provided if it satisfies [ ` bidirectional_range ` ](/w/cpp/ranges/bidi... | |
C++_Ranges_library/accumulate4_3_0.txt | ##### Views
* View
* Edit
* History | |
C++_Ranges_library/param-pack.html4_28_0.txt | Template parameter packs consist of types, templates, and values within the
angle brackets of a template definition. Any normal template parameter can be
turned into a pack by prefixing the identifier with an ellipsis. For example:
template<typename ...T> struct S1{};
template<int ...I> struc... | |
C++_Ranges_library/C++_Ranges_library_59_15.txt | ue = /* unspecified */; }
// freestanding
// filter view
template<input_range V, indirect_unary_predicate<iterator_t<V>> Pred>
requires view<V> && is_object_v<Pred>
class filter_view; ... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_5_0.txt | Sign up or log in to customize your list.
### more stack exchange communities | |
C++_Ranges_library/C++_Ranges_library_136_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/C++_Ranges_library_88_7.txt | [ [edit]
](https://en.cppreference.com/mwiki/index.php?title=Template:cpp/ranges/dsc_owning_view&action=edit)
[ ranges::filter_view views::filter ](/w/cpp/ranges/filter_view "cpp/ranges/filter view") (C++20) | a [ ` view ` ](/w/cpp/ranges/view "cpp/ranges/view") that consists of the elements of a [ ` range ` ](... | |
C++_Ranges_library/accumulate4_15_0.txt | ` std::accumulate ` performs a left fold . In order to perform a right fold,
one must reverse the order of the arguments to the binary operator, and use
reverse iterators.
If left to type inference, op operates on values of the same type as init
which can result in unwanted casting of the iterator elements. For e... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_135_0.txt | 0
how to check that for variable of type int, cin does not take numbers as well
characters | |
C++_Ranges_library/C++_Ranges_library_140_4.txt | kell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages. ( [ Src ](https://github.com/apache/thrift) ) | Apache-2.0 | cmake, vcpkg
[ Boost.Asio ](https://boost.org/libs/asio/) | Asynchronous and synchronous networking, timers, serial I/O | [ BSL-1.0 ](https://www.boost.org/LICENS... | |
C++_Ranges_library/checking-cin-input-stream-produces-an-integer9_134_0.txt | 2
checking for user integer input with cin gives infinite loop | |
C++_Ranges_library/C++_Ranges_library_150_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_49_2.txt | llowed to have non
equality-preserving requires expressions:
* [ ` output_iterator ` ](/w/cpp/iterator/output_iterator "cpp/iterator/output iterator")
* [ ` indirectly_writable ` ](/w/cpp/iterator/indirectly_writable "cpp/iterator/indirectly writable")
* [ ` invocable ` ](/w/cpp/concepts/invocable "cpp/concept... | |
C++_Ranges_library/C++_Ranges_library_73_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/what-will-be-the-output-of-the-following-c-code--5ab8a41bc56b6664bc9bacdd8_53_0.txt | Q7. Which of the following statements is TRUE ?
Q8. What is the result of evaluating the postfix expression “43*25* + 8 -” ? | |
C++_Ranges_library/C++_Ranges_library_72_0.txt | ##### [ cppreference.com ](/)
[ Log in
](/mwiki/index.php?title=Special:UserLogin&returnto=cpp%2Franges%2Fempty "You
are encouraged to log in; however, it is not mandatory \[o\]")
##### Namespaces
* [ Page ](/w/cpp/ranges/empty "View the content page \[c\]")
* [ Discussion ](/mwiki/index.php?title=Talk:cpp/ran... | |
C++_Ranges_library/C++_Ranges_library_71_4.txt | ncept /*can-reference*/ if and
only if ` T& ` is a valid type.
2) ` views::zip_transform ` is a customization point object.
When calling with one argument f , let ` FD ` be [ std:: decay_t
](http://en.cppreference.com/w/cpp/types/decay) < decltype ( f ) > , if:
* ` FD ` models [ ` copy_constructible ` ]... | |
C++_Ranges_library/C++_Ranges_library_51_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_81_4.txt | p/ranges/single_view "cpp/ranges/single view") satisfy this concept.
` lazy_split_view ` models the concepts [ ` forward_range `
](/w/cpp/ranges/forward_range "cpp/ranges/forward range") and [ ` input_range
` ](/w/cpp/ranges/input_range "cpp/ranges/input range") when the underlying [
` view ` ](/w/cpp/ranges/view "cpp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.