![]() |
Home | Libraries | People | FAQ | More |
Return a bool
pointer if
this is a boolean, else return nullptr
bool* if_bool() noexcept;
If this->kind() == kind::bool_
,
returns a pointer to the underlying boolean. Otherwise, returns nullptr
.
The return value is used in both a boolean context and to assign a variable:
if( auto p = jv.if_bool() ) return *p;
Constant.
No-throw guarantee.