safe_numerics
safe_numerics copied to clipboard
Replacements to standard numeric types which throw exceptions on errors
Is it intentional that the following code does not produce an error when compiled? ``` #include #include #include static_assert(std::is_convertible_v); ``` It seems wrong, but maybe there is a reason for...
Can this be fixed or is this a specific error with `std::format()` and `std::vformat()`? This source code fails. By the way, the same error happens with `std::format()`. ```cpp std::string task_advertisement_verification(const...
Source: ```cpp std::unordered_map tmp; ``` Result: ```sh /home/matheus/programmieren/c++/argo/src/database/User.cpp:508:87: required from here 508 | std::unordered_map tmp; | ^~~ /usr/include/c++/15.2.1/bits/hashtable.h:210:51: Fehler: statische Assertion fehlgeschlagen: hash function must be copy constructible 210 |...
From the documentation ```cpp using logging_exception_policy = exception_policy< log_runtime_exception, // arithmetic error ignore_exception, // implementation defined behavior ignore_exception, // undefined behavior ignore_exception // uninitialized value >; ``` It would make...
at https://www.boost.org/doc/libs/1_89_0/libs/safe_numerics/doc/html/promotion_policies/native.html It says "#include " shoud say "#include " The link is broken in any case
CTAD: class template argument deduction Such thing will allow this use case, in C++20 and higher. ```cpp #include void uncontrolled(double*, int); // true external function using boost::safe_numerics::safe; int main() {...