From: Peter C. <pet...@ar...> - 2010-06-11 16:03:12
|
Hi, I have a little problem ... There is a class KernelDensity declared as follows in the type.xml file: <DataType defaultSuperType='libraryClass'>QuantLib::KernelDensity</DataType> There is a second class RiskEngine with a member function which returns a shared_ptr<KerndelDensity>. In QuantLib: boost::shared_ptr<KernelDensity> kernelDensity(string name, int method); The xml for the declaration of this member function looks like this: <ReturnValue> <type>QuantLib::KernelDensity</type> <tensorRank>scalar</tensorRank> </ReturnValue> When I compile the whole thing I get error C2440: 'Initialisierung': 'boost::shared_ptr<T>' kann nicht in 'std::basic_string<_Elem,_Traits,_Ax>' konvertiert werden with 2> T=QuantLib::KernelDensity 2> and 2> _Elem=char, 2> _Traits=std::char_traits<char>, 2> _Ax=std::allocator<char> I did not find an example in the existing code where an object (other than native types) is returned, so can someone explain to me, how to do this? Thanks a lot in advance, best regards Peter |