Help on template specialization

V

Virendra Verma

Hi all,

Is second definition a specialization of the first as per Stroustrup?
Visual C++ thinks it is not (error C2912 ). Thanks for help.

template< class T, class Cmp >
bool BinSearch( int& nMid, const T * pVec, int nSize, Cmp& cmp );

template<>
bool BinSearch( int& nMid, const char ** pVec, int nSize,
Comparator<const char *>& cmp );
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top