[C++-sig] Linking problem

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Wed Jul 2 17:55:29 CEST 2003


--- Philippe Fremy <phil at freehackers.org> wrote:
> template<data2str f> 
> char const * data2strWrapperWithList( boost::python::list dataList )
> {
>   Apdu apdu = list2apdu( dataList );
>   return (const char *) ((*f)( apdu.bytes(), apdu.len() ));
> }

Maybe VC gets confused because "f" does not appear in the signature of your
function? I'd try to work around this like so:

template<data2str f> 
struct data2strWrapper
{
  static char const*
  WithList(boost::python::list dataList)
  {
    Apdu apdu = list2apdu( dataList );
    return (const char *) ((*f)( apdu.bytes(), apdu.len() ));
  }
};

Then def data2strWrapper<T>::WithList.

Ralf


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com




More information about the Cplusplus-sig mailing list