Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <stl_util.h>
Public Member Functions | |
template<typename STLContainer > | |
ValueDeleter (STLContainer *ptr) | |
~ValueDeleter () | |
ValueDeleter (const ValueDeleter &)=delete | |
void | operator= (const ValueDeleter &)=delete |
ValueDeleter is an RAII object that deletes the 'second' member in the given container of std::pair<>s when it goes out of scope.
Example: std::map<std::string, Foo*> foo_map; ValueDeleter d(&foo_map); if (...) return false; ... return success;
Definition at line 476 of file stl_util.h.
|
inlineexplicit |
Definition at line 479 of file stl_util.h.
|
inline |
Definition at line 482 of file stl_util.h.
|
delete |
|
delete |