Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2025-01-16 17:08:09


Matt Borland wrote:
> I guess I don't know a "superior" way to write all types in T should be decimal
> floating point types.

(is_decimal_floating_point_v<T> && ...)

when fold expressions are available, and

std::conjunction_v<is_decimal_floating_point<T>>

when not.

(Or mp11::mp_all instead of std::conjunction.)

But that's not what the common_type constraint said. common_type<int,
decimal32> is decimal32, so it would accept (int, decimal32). (But would
not accept int by itself, or (int, int).)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk