value::as_array
Return a reference to the underlying array
, or throw an exception.
Synopsis
array&
as_array(
boost::source_location const& loc = BOOST_CURRENT_LOCATION) &; (1)
array&&
as_array(
boost::source_location const& loc = BOOST_CURRENT_LOCATION) &&; (2)
array const&
as_array(
boost::source_location const& loc = BOOST_CURRENT_LOCATION) const&; (3)
Description
If is_array()
is true
, returns a reference to the underlying array
, otherwise throws an exception.
Exception Safety
Strong guarantee.
Parameters
Name | Description |
---|---|
|
|
Exceptions
Type | Thrown On |
---|---|
|
|
Complexity
Constant.