From 07f6748c9ae255227903bde4fe359bc31c943494 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Sun, 19 Nov 2017 13:13:32 +0100 Subject: Added the conversion from number to 64 bits integer Signed-off-by: Olivier Gayot --- number.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'number.h') diff --git a/number.h b/number.h index 337a47d..d0d2a10 100644 --- a/number.h +++ b/number.h @@ -34,6 +34,14 @@ public: */ std::uint32_t to_uint32() const; + /** + * \brief Return a 64-bits-wide integer that corresponds to this number. + * + * \throws std::out_of_range The number cannot be represented by a single + * 64-bits-wide integer. + */ + std::uint64_t to_uint64() const; + /** * \brief Return true if this number is not equal to 0. Otherwise, return * false. -- cgit v1.2.3