replacing OUString::valueOf(static_cast<sal_Int32>) ??
Stephan Bergmann
sbergman at redhat.com
Wed Jan 9 23:48:02 PST 2013
On 01/09/2013 05:02 PM, Lubos Lunak wrote:
> 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.
The concept of "integer conversion rank" ([conv.rank] aka 4.13, new in
C++11, borrowed from C) is completely independent of the concept of
"conversion rank" in [over.match.best] (aka 13.3.3).
Stephan
More information about the LibreOffice
mailing list