FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
Loading...
Searching...
No Matches
checked.hpp File Reference
#include <fcb/error.hpp>
#include <cstdint>
#include <string>

Go to the source code of this file.

Namespaces

namespace  fcb
 
namespace  fcb::detail
 

Functions

std::uint64_t fcb::detail::checked_add (std::uint64_t a, std::uint64_t b, const char *what="add")
 
std::uint64_t fcb::detail::checked_mul (std::uint64_t a, std::uint64_t b, const char *what="mul")
 
std::uint64_t fcb::detail::ceil_div (std::uint64_t a, std::uint64_t b)
 ceil(a / b) without the (a + b - 1) overflow hazard.
 
std::uint64_t fcb::detail::range_end (std::uint64_t offset, std::uint64_t length)
 End of a range, checked.
 
void fcb::detail::require_within (std::uint64_t offset, std::uint64_t length, std::uint64_t limit, const char *what)
 Throws unless [offset, offset+length) lies wholly within limit.