Template Function sequant::detail::remove_one¶
Defined in File indices.hpp
Function Documentation¶
-
template<typename Container, typename Element>
void sequant::detail::remove_one(Container &container, const Element &e)¶ This function is equal to std::remove in case the given container contains none or only a single occurrence of the given element. If the given element is contained multiple times, only the first occurrence is removed. If it is known that there is only a single occurrence of the given element, this function can be more efficient than std::remove as it can terminate as soon as the element has been found instead of having to traverse the entire container.