MCPcopy Create free account
hub / github.com/boostorg/json / if_array

Method if_array

include/boost/json/value.hpp:1403–1409  ·  view source on GitHub ↗

Return a pointer to the underlying @ref array. If `this->kind() == kind::array`, returns a pointer to the underlying array. 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_array() ) return *p; @endcode @par Complexit

Source from the content-addressed store, hash-verified

1401 @{
1402 */
1403 array const*
1404 if_array() const noexcept
1405 {
1406 if(kind() == json::kind::array)
1407 return &arr_;
1408 return nullptr;
1409 }
1410
1411 array*
1412 if_array() noexcept

Callers 5

tag_invokeFunction · 0.80
testIfMethod · 0.80
usingPointerFunction · 0.80
check_refMethod · 0.80
value_to_implFunction · 0.80

Calls 1

kindEnum · 0.85

Tested by

no test coverage detected