Concurrently safe modifiers#
All member functions in this section can be performed concurrently with each other.
Pushing elements#
void push( const value_type& value );Pushes a copy of
valueinto the container.Requirements: the type
Tmust meet theCopyInsertablerequirements from [container.requirements] and theCopyAssignablerequirements from [copyassignable] ISO C++ Standard sections.void push( value_type&& value );Pushes
valueinto the container using move semantics.Requirements: the type
Tmust meet theMoveInsertablerequirements from [container.requirements] and theMoveAssignablerequirements from [moveassignable] ISO C++ Standard sections.
valueis left in a valid, but unspecified state.template <typename... Args> void emplace( Args&&... args );Pushes a new element constructed from
argsinto the container.Requirements: the type
Tmust meet theEmplaceConstructiblerequirements from [container.requirements] and theMoveAssignablerequirements from [moveassignable] ISO C++ Standard sections.
Popping elements#
bool try_pop( value_type& value )If the container is empty, does nothing.
Otherwise, copies the highest priority element from the container and assigns it to
value. The popped element is destroyed.Requirements: the type
Tmust meet theMoveAssignablerequirements from the [moveassignable] ISO C++ Standard section.Returns:
trueif the element was popped;false, otherwise.