For Programmers: Free Programming Magazines  


Home > Archive > VC STL > August 2005 > How to call the template code from aspecialized member function ?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to call the template code from aspecialized member function ?
jean Davy

2005-08-11, 9:05 am

I want to specialize the insert function for a set of specific class, here
is the code

typedef std::set< CMyObject* > CMyObjectList;
template <>
CMyObjectList::_Pairib
CMyObjectList::_Mybase::insert( const CMyObjectList::value_type& _Val )
{
... some specific processing
return CMyObjectList::_Mybase::insert( _Val ); // how to call the "base
class" function ?
}

But I can't call the generic code of the template, the only way I found is
to copy the code :((




Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com