Partager via


forward_list Members

Reference

Constructors

forward_list

Constructs an object of type forward_list.

Typedefs

allocator_type

A type that represents the allocator class for a forward list object.

const_iterator

A type that provides a constant iterator for the forward list.

const_pointer

A type that provides a pointer to a const element in a forward list.

const_reference

A type that provides a constant reference to an element in the forward list.

difference_type

A signed integer type that can be used to represent the number of elements of a forward list in a range between elements pointed to by iterators.

iterator

A type that provides an iterator for the forward list.

pointer

A type that provides a pointer to an element in the forward list.

reference

A type that provides a reference to an element in the forward list.

size_type

A type that represents the unsigned distance between two elements.

value_type

A type that represents the type of element stored in a forward list.

Member Functions

assign

Erases elements from a forward list and copies a new set of elements to a target forward list.

before_begin

Returns an iterator addressing the position before the first element in a forward list.

begin

Returns an iterator addressing the first element in a forward list.

cbefore_begin

Returns a const iterator addressing the position before the first element in a forward list.

cbegin

Returns a const iterator addressing the first element in a forward list.

cend

Returns a const iterator that addresses the location succeeding the last element in a forward list.

clear

Erases all the elements of a forward list.

emplace_after

Move constructs a new element after a specified position.

emplace_front

Adds an element constructed in place to the beginning of the list.

empty

Tests whether a forward list is empty.

end

Returns an iterator that addresses the location succeeding the last element in a forward list.

erase_after

Removes elements from the forward list after a specified position.

front

Returns a reference to the first element in a forward list.

get_allocator

Returns a copy of the allocator object used to construct a forward list.

insert_after

Adds elements to the forward list after a specified position.

max_size

Returns the maximum length of a forward list.

merge

Removes the elements from the argument list, inserts them into the target forward list, and orders the new, combined set of elements in ascending order or in some other specified order.

pop_front

Deletes the element at the beginning of a forward list.

push_front

Adds an element to the beginning of a forward list.

remove

Erases elements in a forward list that matches a specified value.

remove_if

Erases elements from a forward list for which a specified predicate is satisfied.

resize

Specifies a new size for a forward list.

reverse

Reverses the order in which the elements occur in a forward list.

sort

Arranges the elements in ascending order or with an order specified by a predicate.

splice_after

Restitches links between nodes.

swap

Exchanges the elements of two forward lists.

unique

Removes adjacent elements that pass a specified test.

Operators

operator=

Replaces the elements of the forward list with a copy of another forward list.