! @return The size of the BSON-encoded integer @a value */
| 15950 | @return The size of the BSON-encoded integer @a value |
| 15951 | */ |
| 15952 | static std::size_t calc_bson_integer_size(const std::int64_t value) |
| 15953 | { |
| 15954 | return (std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)() |
| 15955 | ? sizeof(std::int32_t) |
| 15956 | : sizeof(std::int64_t); |
| 15957 | } |
| 15958 | |
| 15959 | /*! |
| 15960 | @brief Writes a BSON element with key @a name and integer @a value |
nothing calls this directly
no outgoing calls
no test coverage detected