Question about class Disposable

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about class Disposable

Kim Kuen Tang
Hi all,

what was the rationale to implement the class Disposable ?

And when should one use this class?

As I can see from the code:

template <class T>
inline Disposable<T>& Disposable<T>::operator=(const Disposable<T>& t) {
this->swap(const_cast<Disposable<T>&>(t));
return *this;
}

the user must supply a swap function to use the assign operator.
So the user can control what he/she wants to assign?



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Question about class Disposable

Ferdinando M. Ametrano-3
On Fri, Jun 13, 2008 at 11:24 PM, Kim Kuen tang <[hidden email]> wrote:
> what was the rationale to implement the class Disposable ?

http://quantlib.org/quep/quep009.html

ciao -- Nando

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users