---
name: "bson_iter_as_int64"
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_as_int64"
---

# bson\_iter\_as\_int64(3)

## SYNOPSIS

```
int64_t
bson_iter_as_int64 (const bson_iter_t *iter);
```

## PARAMETERS

- •

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

## DESCRIPTION

The **bson\_iter\_as\_int64()** function shall return the contents of the current element as if it were a BSON\_TYPE\_INT64 element. The currently supported casts include:

- •

  BSON\_TYPE\_BOOL

- •

  BSON\_TYPE\_DOUBLE

- •

  BSON\_TYPE\_INT32

- •

  BSON\_TYPE\_INT64

## RETURNS

A 64-bit signed integer.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
