Return a pointer to the underlying `bool` . If `this->kind() == kind::bool_`, returns a pointer to the underlying boolean. Otherwise, returns `nullptr`. @par Example The return value is used in both a boolean context and to assign a variable: @code if( auto p = jv.if_bool() ) return *p; @endcode @par Complexity
| 1629 | @{ |
| 1630 | */ |
| 1631 | bool const* |
| 1632 | if_bool() const noexcept |
| 1633 | { |
| 1634 | if(kind() == json::kind::bool_) |
| 1635 | return &sca_.b; |
| 1636 | return nullptr; |
| 1637 | } |
| 1638 | |
| 1639 | bool* |
| 1640 | if_bool() noexcept |
no test coverage detected