float/double/long double
overloads be fused into template overloads?Section: 29.7 [c.math] Status: New Submitter: Jiang An Opened: 2022-04-28 Last modified: 2022-05-17
Priority: 2
View all other issues in [c.math].
View all issues with New status.
Discussion:
IIUC LWG 3234 will be resolved by the recently approved paper P1467R9. While considering adding the newly required overloads of math special functions to MSVC STL, I found that it may be more convenient to implement the whole overload set as a single function template.
However, it's unclear for me whether the every "overload for each cv-unqualified floating-point type", or every currently separately shown overloads in the synopsis of<cmath>
, is
required to be a separated function. As discussed in
microsoft/STL#1335, if there were only a
separated double
overload (usually comes from the C standard library) and a fused template
overload, calling the overload set with {}
would be accepted, which is definitely ambiguous
when there are separated float/double/long double
overloads.
I think it may be better to allow implementations to arbitrarily fuse the required overloads.
[2022-05-17; Reflector poll]
Set priority to 2 after reflector poll. One vote for NAD.
Proposed resolution: