Fix cbor encoding for uint64_t's (#442)

Signed-off-by: David Corbeil <8996584+dcorbeil@users.noreply.github.com>
Signed-off-by: Ian Flury <ianflury123@gmail.com>
Co-authored-by: David Corbeil <8996584+dcorbeil@users.noreply.github.com>
This commit is contained in:
Ian Flury
2025-05-31 23:12:17 +02:00
committed by GitHub
co-authored by David Corbeil
parent 750e67d630
commit dd257a84db
2 changed files with 41 additions and 0 deletions
+2
View File
@@ -103,6 +103,8 @@ class Writer {
encoder_->bool_value(_var);
} else if constexpr (std::is_floating_point<std::remove_cvref_t<T>>()) {
encoder_->double_value(static_cast<double>(_var));
} else if constexpr (std::is_unsigned<std::remove_cvref_t<T>>()) {
encoder_->uint64_value(static_cast<std::uint64_t>(_var));
} else if constexpr (std::is_integral<std::remove_cvref_t<T>>()) {
encoder_->int64_value(static_cast<std::int64_t>(_var));
} else {