Hi all,
I have found something that seems to be a bug in the disposable
Disposable Class Template. Indeed, the following constructor destroys the non
disposable object t given as argument: (<a
href="mk:@MSITStore:C:\Program%20Files\Quantlib\QuantLib-0.3.12\Docs\QuantLib_cpp-3.12.chm::/disposable_8hpp-source.html">ql/Utilities/disposable.hpp
line 74 to 77)
template <class T>
inline Disposable<T>::Disposable(T& t) {
this->swap(t);
}
To my point of view this behaviour is not consistent
with the original Luigi’s proposal. By the way, this “bug” is
corrected in the code excerpts featured in the QuEP9.
Best regards,
François