Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
gtl::ValueDeleter Class Reference

#include <stl_util.h>

Public Member Functions

template<typename STLContainer >
 ValueDeleter (STLContainer *ptr)
 
 ~ValueDeleter ()
 
 ValueDeleter (const ValueDeleter &)=delete
 
void operator= (const ValueDeleter &)=delete
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ValueDeleter() [1/2]

template<typename STLContainer >
gtl::ValueDeleter::ValueDeleter ( STLContainer * ptr)
inlineexplicit

Definition at line 479 of file stl_util.h.

◆ ~ValueDeleter()

gtl::ValueDeleter::~ValueDeleter ( )
inline

Definition at line 482 of file stl_util.h.

◆ ValueDeleter() [2/2]

gtl::ValueDeleter::ValueDeleter ( const ValueDeleter & )
delete

Member Function Documentation

◆ operator=()

void gtl::ValueDeleter::operator= ( const ValueDeleter & )
delete

The documentation for this class was generated from the following file: