Help on template specialization

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Virendra Verma

    Help on template specialization

    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<cons t char *>& cmp );
  • Virendra Verma

    #2
    Re: Help on template specialization

    Thanks, Victor.

    Comment

    Working...