Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update ranges.mdx
  • Loading branch information
std-microblock authored Dec 5, 2025
commit 829895cd39f35d89c3d4bebf76117838ba2afcdd
62 changes: 31 additions & 31 deletions src/content/docs/cpp/library/ranges.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,89 +24,89 @@ namespace std {

The namespace alias `std::views` is provided as a shorthand for `std::ranges::views`.

## Defined in namespace `std::ranges`
##### Defined in namespace `std::ranges`

### Range access

## Defined in header <CppHeader name="ranges" />
## Defined in header <CppHeader name="iterator" />
##### Defined in header <CppHeader name="ranges" />
##### Defined in header <CppHeader name="iterator" />

<DescList>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/begin">`ranges::begin`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/begin">`ranges::begin` :badge[C++20] </DocLink>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These badges do not render correctly.

returns an iterator to the beginning of a range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/end">`ranges::end`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/end">`ranges::end` :badge[C++20] </DocLink>
returns a sentinel indicating the end of a range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/cbegin">`ranges::cbegin`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/cbegin">`ranges::cbegin` :badge[C++20] </DocLink>
returns an iterator to the beginning of a read-only range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/cend">`ranges::cend`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/cend">`ranges::cend` :badge[C++20] </DocLink>
returns a sentinel indicating the end of a read-only range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/rbegin">`ranges::rbegin`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/rbegin">`ranges::rbegin` :badge[C++20] </DocLink>
returns a reverse iterator to a range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/rend">`ranges::rend`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/rend">`ranges::rend` :badge[C++20] </DocLink>
returns a reverse end iterator to a range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/crbegin">`ranges::crbegin`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/crbegin">`ranges::crbegin` :badge[C++20] </DocLink>
returns a reverse iterator to a read-only range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/crend">`ranges::crend`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/crend">`ranges::crend` :badge[C++20] </DocLink>
returns a reverse end iterator to a read-only range
(customization point object)
</Desc>
<Desc autorevSince="C++26">
<DocLink slot="item" src="/cpp/ranges/reserve_hint">`ranges::reserve_hint`</DocLink>
<DocLink slot="item" src="/cpp/ranges/reserve_hint">`ranges::reserve_hint` :badge[C++26] </DocLink>
returns an integer equal to the reserve hint given by a range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/size">`ranges::size`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/size">`ranges::size` :badge[C++20] </DocLink>
returns an integer equal to the size of a range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/ssize">`ranges::ssize`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/ssize">`ranges::ssize` :badge[C++20] </DocLink>
returns a signed integer equal to the size of a range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/empty">`ranges::empty`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/empty">`ranges::empty` :badge[C++20] </DocLink>
checks whether a range is empty
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/data">`ranges::data`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/data">`ranges::data` :badge[C++20] </DocLink>
obtains a pointer to the beginning of a contiguous range
(customization point object)
</Desc>
<Desc autorevSince="C++20">
<DocLink slot="item" src="/cpp/library/ranges/cdata">`ranges::cdata`</DocLink>
<DocLink slot="item" src="/cpp/library/ranges/cdata">`ranges::cdata` :badge[C++20] </DocLink>
obtains a pointer to the beginning of a read-only contiguous range
(customization point object)
</Desc>
</DescList>

### Range primitives

## Defined in header <CppHeader name="ranges" />
##### Defined in header <CppHeader name="ranges" />

<DescList>
<Desc autorevSince="C++20">
Expand All @@ -128,7 +128,7 @@ The namespace alias `std::views` is provided as a shorthand for `std::ranges::vi

### Dangling iterator handling

## Defined in header <CppHeader name="ranges" />
##### Defined in header <CppHeader name="ranges" />

<DescList>
<Desc autorevSince="C++20">
Expand All @@ -145,7 +145,7 @@ The namespace alias `std::views` is provided as a shorthand for `std::ranges::vi

### Other utilities

## Defined in header <CppHeader name="ranges" />
##### Defined in header <CppHeader name="ranges" />

<DescList>
<Desc autorevSince="C++23">
Expand All @@ -157,7 +157,7 @@ The namespace alias `std::views` is provided as a shorthand for `std::ranges::vi

### Range concepts

## Defined in header <CppHeader name="ranges" />
##### Defined in header <CppHeader name="ranges" />

<DescList>
<Desc autorevSince="C++20">
Expand Down Expand Up @@ -234,7 +234,7 @@ The namespace alias `std::views` is provided as a shorthand for `std::ranges::vi

### Range conversions

## Defined in header <CppHeader name="ranges" />
##### Defined in header <CppHeader name="ranges" />

<DescList>
<Desc autorevSince="C++23">
Expand All @@ -246,7 +246,7 @@ The namespace alias `std::views` is provided as a shorthand for `std::ranges::vi

### Views

## Defined in header <CppHeader name="ranges" />
##### Defined in header <CppHeader name="ranges" />

<DescList>
<Desc autorevSince="C++20">
Expand All @@ -263,8 +263,8 @@ The namespace alias `std::views` is provided as a shorthand for `std::ranges::vi

### Range factories

## Defined in header <CppHeader name="ranges" />
## Defined in namespace `std::ranges`
##### Defined in header <CppHeader name="ranges" />
##### Defined in namespace `std::ranges`

<DescList>
<Desc autorevSince="C++20">
Expand Down Expand Up @@ -296,8 +296,8 @@ The namespace alias `std::views` is provided as a shorthand for `std::ranges::vi

### Range adaptors

## Defined in header <CppHeader name="ranges" />
## Defined in namespace `std::ranges`
##### Defined in header <CppHeader name="ranges" />
##### Defined in namespace `std::ranges`

<DescList>
<Desc autorevSince="C++23">
Expand Down Expand Up @@ -477,10 +477,10 @@ The namespace alias `std::views` is provided as a shorthand for `std::ranges::vi
</Desc>
</DescList>

### Range generators <Revision since="C++23">(since C++23)</Revision>
### Range generators :badge[C++23]

## Defined in header <CppHeader name="generator" />
## Defined in namespace `std`
##### Defined in header <CppHeader name="generator" />
##### Defined in namespace `std`

<DescList>
<Desc autorevSince="C++23">
Expand Down Expand Up @@ -760,4 +760,4 @@ The following behavior-changing defect reports were applied retroactively to pre
### See also

* <DocLink src="/cpp/library/iterator">Iterator library</DocLink>
* <DocLink src="/cpp/library/algorithm/ranges">Constrained algorithms</DocLink>
* <DocLink src="/cpp/library/algorithm/ranges">Constrained algorithms</DocLink>