Skip to content

Instantly share code, notes, and snippets.

@vinniefalco
Created September 4, 2020 19:46
Show Gist options
  • Save vinniefalco/c4635c98ad51dee7eec935a9661356c0 to your computer and use it in GitHub Desktop.
Save vinniefalco/c4635c98ad51dee7eec935a9661356c0 to your computer and use it in GitHub Desktop.
/** Return an @ref array pointer if this is an array, else return `nullptr`
If `this->kind() == kind::array`, then a pointer
to the underlying array is returned. Otherwise,
`nullptr` is returned.
@par Example
The semantics of the function allow the return
value to be used in a conditional expression as
a boolean, or in a conditional assignment such
as:
@code
if( auto p = jv.is_array() )
...
@endcode
@par Complexity
Constant.
@par Exception Safety
No-throw guarantee.
*/
array const*
is_array() const noexcept
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment