local type in template - C2918
- From: "PGP" <priyesh_do_not_reply>
- Date: Mon, 19 Mar 2007 09:57:11 -0600
Could anyone please explain why a function object used in for_each or other
algorithms cannot be a local type? Sometimes performing an operation on
elements of a container only applies to one function and it would be nice to
do
CDeveloperEnvironment::CVariables::~CVariables()
{
struct Delete
{
void operator()(Developer::Types::VARIABLEMAP::value_type& vt){delete
vt.second ;}
};
std::for_each(m_mapVariables.begin(), m_mapVariables.end(), Delete()) ;
}
TIA
Priyesh.
.
- Follow-Ups:
- Re: local type in template - C2918
- From: Igor Tandetnik
- Re: local type in template - C2918
- Prev by Date: Re: Performance problem with _SECURE_SCL=0
- Next by Date: Re: local type in template - C2918
- Previous by thread: Erase in a map
- Next by thread: Re: local type in template - C2918
- Index(es):
Loading