Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members

s11n::pair_entry_deallocator Struct Reference

A functor allowing pairs of PODs and pointers to be mixed together in any combination and be deallocated in a uniform way. More...

#include <functor.h>

List of all members.

Public Member Functions

template<typename PairType> void operator() (PairType &p) const
 Deallocates p.first and p.second.


Detailed Description

A functor allowing pairs of PODs and pointers to be mixed together in any combination and be deallocated in a uniform way.

Admitedly, it's a waste of time for value types, but the point is a single functor which can work for all pair types.

sample:

std::for_each( map.begin(), map.end(), pair_entry_deallocator() );

Definition at line 274 of file functor.h.


Member Function Documentation

template<typename PairType>
void s11n::pair_entry_deallocator::operator() PairType &  p  )  const [inline]
 

Deallocates p.first and p.second.

PairType must not be a pointer type.

Definition at line 281 of file functor.h.

References operator()().

Referenced by operator()().


The documentation for this struct was generated from the following file:
Generated on Tue Jul 20 10:46:49 2004 for s11n by doxygen 1.3.7