|
Boost : |
From: Matt Borland (matt_at_[hidden])
Date: 2025-01-16 17:26:11
On Thu, Jan 16, 2025 at 12:08, Peter Dimov <pdimov_at_[hidden]> wrote: 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>>
I did not know conjunction existed. Learn something new everyday. Thanks.
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