
16 Jan
2025
16 Jan
'25
5:26 p.m.
On Thu, Jan 16, 2025 at 12:08, Peter Dimov <pdimov@gmail.com> 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).)