Added a conversion to bool to check if a functor it's been initialized.
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@84 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
aeb33168e8
commit
90a16ecbd4
3 changed files with 15 additions and 0 deletions
|
@ -762,6 +762,11 @@ namespace Loki
|
|||
: spImpl_(new MemFunHandler<Functor, PtrObj, MemFn>(p, memFn))
|
||||
{}
|
||||
|
||||
operator bool()
|
||||
{
|
||||
return spImpl_.get() ? true : false;
|
||||
}
|
||||
|
||||
Functor& operator=(const Functor& rhs)
|
||||
{
|
||||
Functor copy(rhs);
|
||||
|
|
|
@ -899,6 +899,11 @@ namespace Loki
|
|||
: spImpl_(new MemFunHandler<Functor, PtrObj, MemFn>(p, memFn))
|
||||
{}
|
||||
|
||||
operator bool()
|
||||
{
|
||||
return spImpl_.get() ? true : false;
|
||||
}
|
||||
|
||||
Functor& operator=(const Functor& rhs)
|
||||
{
|
||||
Functor copy(rhs);
|
||||
|
|
|
@ -762,6 +762,11 @@ namespace Loki
|
|||
: spImpl_(new MemFunHandler<Functor, PtrObj, MemFn>(p, memFn))
|
||||
{}
|
||||
|
||||
operator bool()
|
||||
{
|
||||
return spImpl_.get() ? true : false;
|
||||
}
|
||||
|
||||
Functor& operator=(const Functor& rhs)
|
||||
{
|
||||
Functor copy(rhs);
|
||||
|
|
Loading…
Add table
Reference in a new issue