Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 69109f5924.
PrevUpHomeNext
value::if_int64 (1 of 2 overloads)

Return an int64_t pointer if this is a signed integer, else return nullptr

Synopsis
std::int64_t const*
if_int64() const;
Description

If this->kind() == kind::int64, returns a pointer to the underlying integer. Otherwise, returns nullptr.

Example

The return value is used in both a boolean context and to assign a variable:

if ( auto p = jv.if_int64() )
    return *p;
Complexity

Constant.

Exception Safety

No-throw guarantee.


PrevUpHomeNext