
6 Aug
2019
6 Aug
'19
6:50 p.m.
I think that some rational constructors can be marked noexcept. In particular: - default constructor: rational() - constructor from integer: rational(const T& n, typename enable_if_c<...>::type const* = 0)
Careful: they would have to be conditionally noexcept to support multiprecision types which may throw on those operations (memory allocation).
I see and the default constructor cannot use enable_if. The only possibility would be to have an additionnal bool template parameter is_pod<T> or has_nothrow_constructor<T>... Quite painful to implement. F