mizvekov wrote:

> The argument about allowing concrete overloads for math functions is 
> interesting, although it's very hard for me to imagine someone actually 
> writing out overloads like this rather than using a template. Covering every 
> type in (|__ob_wrap|__ob_trap) (signed|unsigned) (char|short|int|long|long 
> long) is already 30 overloads, and that doesn't even cover all the standard 
> integer types. Even for tgmath.h, that would be pushing it.

Even if we write them out as templates, we still need the OBT specifier on 
argument types to be part of the function type, so that would rule out the 
option where we adjust them away entirely from the function type.

That still leaves the options of either allowing overloading or not.

For user code, it seems plausible that in some situations they would only care 
about a few overloads.

Regarding the option of accepting no overloads, but without any function type 
adjustment: C++, since 17, already has precedent with the noexcept specifier, 
where that became part of the function type, but it's still not overloadable.

https://github.com/llvm/llvm-project/pull/148914
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to