
16 Apr
2023
16 Apr
'23
6:52 p.m.
Hello John, * problem description The functions of boost::multiprecision are not available in std, e.g. template <typename type> Type foo(const Type x) noexcept { return std::sin(x) * 42; } using A = double; A a = foo(A(23)); // ok using B = boost::multiprecision::cpp_bin_float_oct; B b = foo(B(23)); // error As a workaround you currently have to write template <typename Type> Type bar(const Type x) noexcept { using ::std::sin; using ::boost::multiprecision::sin; return sin(x) * 42; } using A = double; A a = bar(A(23)); // ok using B = boost::multiprecision::cpp_bin_float_oct; B b = bar(B(23)); // ok This contradicts the template idea and is time-consuming/error-prone. thx Gero
743
Age (days ago)
743
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gero Peterhoff