quantlib Handle compile error
Posted by
P Nelnik on
May 24, 2010; 5:35am
URL: http://quantlib.414.s1.nabble.com/quantlib-Handle-compile-error-tp7722.html
Happy Monday all,
When trying to use the quantlib Handle<.>, I got a compiler error:
>c:\work\quantlib\quantlib-1.0.1\ql\handle.hpp(143) : error C2664: 'QuantLib::Observer::unregisterWith' : cannot convert parameter 1 from 'boost::shared_ptr<T>' to 'const boost::shared_ptr<T> &'
Though I haven't changed anything in handle.hpp.
Here's the code that generates the error:
class Foo
{public: Integer i;
Foo() { i = 0; }};
int main(){
Handle<Foo> c ( boost::shared_ptr<Foo>(new Foo())); return 0;
}Any ideas what's the cause or solution?
Thanks
Philip
------------------------------------------------------------------------------
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users