Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Issue 18036 - Documentation of moveFront() #8393

Merged
merged 1 commit into from Feb 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions std/range/primitives.d
Expand Up @@ -2055,9 +2055,14 @@ if (isBidirectionalRange!Range)
}

/**
Moves the front of `r` out and returns it. Leaves `r.front` in a
destroyable state that does not allocate any resources (usually equal
to its `.init` value).
Moves the front of `r` out and returns it.
If `r.front` is a struct with a destructor or copy constructor defined, it
is reset to its `.init` value after its value is moved. Otherwise, it is
left unchanged.
In either case, `r.front` is left in a destroyable state that does not
allocate any resources.
*/
ElementType!R moveFront(R)(R r)
{
Expand Down