C++ std::forward_list Methods


Method nameDefinition
operator=assigns values to the container
assignassigns values to the container
get_allocatorreturns the associated allocator
Element access
frontaccess the first element
before_beginreturns an iterator to the element before beginning
cbefore_beginreturns a constant iterator to the element before beginning
beginreturns an iterator to the beginning
cbeginreturns a const iterator to the beginning
endreturns an iterator to the end
cendreturns a iterator to the end
emptychecks whether the container is empty
max_sizereturns the maximum possible number of elements
clearclears the contents
insert_afterinserts elements after an element
emplace_afterconstructs elements in-place after an element
erase_aftererases an element after an element
push_frontinserts an element to the beginning
emplace_frontconstructs an element in-place at the beginning
pop_frontremoves the first element
resizechanges the number of elements stored
swapswaps the contents
mergemerges two sorted lists
splice_aftermoves elements from another forward_list
removeremoves elements satisfying specific criteria
remove_ifremoves elements satisfying specific criteria
reversereverses the order of the elements
uniqueremoves consecutive duplicate elements
sortsorts the elements