So that other people don't have to search: According to my reading of the
standard (mainly 13.3.3.1.1 and 13.3.3.2 [*]), this is because when choosing
which conversion for overloaded functions is better, the standard treats all
integer conversions[**] the same. I'm a bit confused by "the rank of S1 is
better than the rank of S2," in 13.3.3.2, since reading also 4.13 I would say
that long and long long have different rank, therefore int->long should be
prefered to int->long long, but a test with all GCC, Clang and MSVC shows
that having f( long ) and f( long long ) makes f( 0 ) ambiguous :(. Makes me
wonder if there is some obscure reason for this or if just the person coming
up with this was having a bad day.
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.