Overload rules for user literals in C ++ 0x

I'm a little confused about overload rules,

suppose the following literals exist,

unsigned long long operator "" _xx(unsigned long long cooked_literal_int); //1
unsigned long long operator "" _xx(const char * raw_literal_string); // 2
unsigned long long operator "" _xx(long double cooked_literal_double); // 3

if defined as 1, 2, or 3, the overload is obvious,

13_xx //call 1
13.5_xx //call 3

if 1 and 2 are defined,

13_xx //call 1
13.5_xx //call 2

if 2 and 3 are defined

13_xx // call 2 or 3??
13.5_xx // call 3

The confusion comes from the latest C ++ 0x n3225 2.14.8 / 3 standard,

If L is a user-defined integer, let n be a literal without its ud suffix. If S contains a literal operator with parameter type unsigned long long, the literal L is considered as a call of the form

operator "X (n ULL)

Otherwise, S must contain the raw literal or operator literal pattern (13.5.8), but not both. If S contains a raw literal operator, the literal L is treated as a call to the form

operator "" X ("n")

(S ), L

" " X < c1, c2,... ck > ()

n - c1c2... ck.

, 1 ( ), 13_xx 1, 13_xx 2. 13.5.8,

, .

, 1 , 13_xx double 3.

, 1 , 2 3 - .

, - . .

+2
1

, 13.5.8/7 :

: (2.14.8). , , . , .

, .

, , 2 3 , 13_xx 2 ( ).

+4

All Articles