commit 2025-10-05 21:00 add operator bool() in ZtCObjOpt : ZCppMain/ZMainHead.H

This commit is contained in:
2025-10-05 21:00:58 +09:00
parent cd42f26bfd
commit e1519765ba
2 changed files with 5 additions and 1 deletions

View File

@ -4512,7 +4512,8 @@ namespace ZNsMain
ZtCObjOpt& operator=(const ZtCObjOpt& rhs)
{ mp_TypeData=rhs.mp_TypeData; return *this; }
bool has_value() const{return mp_TypeData!=0;}
operator bool () const{return mp_TypeData!=0;}
bool has_value () const{return mp_TypeData!=0;}
TypeData& value() const{return *mp_TypeData ;}