Boost logo

Boost Users :

From: Frédéric (ufospoke_at_[hidden])
Date: 2019-08-06 18:50:55


> > 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net