! @return The size of the BSON-encoded unsigned integer in @a j */
| 13731 | @return The size of the BSON-encoded unsigned integer in @a j |
| 13732 | */ |
| 13733 | static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept |
| 13734 | { |
| 13735 | return (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)())) |
| 13736 | ? sizeof(std::int32_t) |
| 13737 | : sizeof(std::int64_t); |
| 13738 | } |
| 13739 | |
| 13740 | /*! |
| 13741 | @brief Writes a BSON element with key @a name and unsigned @a value |
nothing calls this directly
no outgoing calls
no test coverage detected