I'm trying to do specialization to template operator, the template looks like this:
template <typename Iterator1, typename Iterator2>
ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType worst_dist = -1) const
after i did the specialization that looks like this:
template <>
float operator()<float*,float*>(float* a, float const* b, unsigned long size, float worst_dist = -1) const
i get an error during compilation :
Cannot specialize a function 'operator()' within class scope
All those function are in struct template
I'll be glad to get some help. thanks.
ResultType? Is it supposed to be one of your template parameters? - Alan Stokesunsigned longinstead ofsize_tfor thesizeparameter andfloatinstead ofResultTypeforworst_dist. - Alan Stokes