Utility Rack
Loading...
Searching...
No Matches
erase_where_example.cpp File Reference

Example code demonstrating use of chops::erase_where and chops::erase_where_if. More...

#include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
#include "utility/erase_where.hpp"
Include dependency graph for erase_where_example.cpp:

Functions

int main ()
 std::remove and std::remove_if move the found element(s) to the end of the container. The size of the collection does not chnange. erase must be subsequently called to actually remove the elements from the container.
 

Detailed Description

Example code demonstrating use of chops::erase_where and chops::erase_where_if.

Function Documentation

◆ main()

int main ( )

std::remove and std::remove_if move the found element(s) to the end of the container. The size of the collection does not chnange. erase must be subsequently called to actually remove the elements from the container.

chops::erase_where and chops::erase_where_if are convenience functions that perform the erase-remove idiom.