[C++-sig] Overloading member function problem

Stefan Seefeld seefeld at sympatico.ca
Fri Aug 15 17:25:58 CEST 2008


Simon Pickles wrote:
>
>
> >
> >
> > Looks to me like OP just forgot to pass a type argument to class_<>
> >
> >> class_("logInterface")
> >> .def("Log", &LogS)
> >> .def("Log", &LogF)
> Apologies.
>
> Code actually reads:
>
> class_("logInterface")
> .def("Log", &LogS)
> .def("Log", &LogF)

I don't quite believe you. :-)

As Troy pointed out, class_ is a class template, so you need to provide 
a template argument list to make this code valid. For example:

class_<CLog>("logInterface")
....

HTH,
       Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...




More information about the Cplusplus-sig mailing list