---
name: "bson_iter_overwrite_bool"
section: "3"
platform: "linux"
package: "libbson-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bson_iter_overwrite_bool"
---

# bson\_iter\_overwrite\_bool(3)

## SYNOPSIS

```
void
bson_iter_overwrite_bool (bson_iter_t *iter, bool value);
```

## PARAMETERS

- •

  **iter**: A *bson\_iter\_t*.

- •

  **value**: A bool containing the new value.

## DESCRIPTION

The **bson\_iter\_overwrite\_bool()** function shall overwrite the contents of a BSON\_TYPE\_BOOL element in place.

This may only be done when the underlying bson document allows mutation.

It is a programming error to call this function when **iter** is not observing an element of type BSON\_TYPE\_BOOL.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
