bson_iter_bool man page

bson_iter_bool() — The bson_iter_bool() function shall return the boolean value of a BSON_TYPE_BOOL element. It is a programming error to call this function on an element other than BSON_TYPE_BOOL. You can check this with bson_iter_type() or BSON_ITER_HOLDS_BOOL().

Synopsis

#define BSON_ITER_HOLDS_BOOL(iter) \
   (bson_iter_type ((iter)) == BSON_TYPE_BOOL)

bool
bson_iter_bool (const bson_iter_t *iter);

Parameters

iter
A bson_iter_t

Description

The bson_iter_bool(3) function shall return the boolean value of a BSON_TYPE_BOOL element. It is a programming error to call this function on an element other than BSON_TYPE_BOOL. You can check this with bson_iter_type(3) or BSON_ITER_HOLDS_BOOL(3)

Returns

Either true or false

Colophon

This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.

Info

2016‐11‐12 libbson