If S contains a literal operator with
parameter type unsigned long, the literal L is treated as a call of
the form
operator ""X(nULL)
Otherwise,
S shall contain a raw literal operator
or a numeric literal operator template (
[over.literal]) but not both
. If S contains a raw literal operator,
the literal L is treated as a call of the form
operator ""X("n")
Otherwise (
S contains a numeric literal operator template),
L is treated as a call of the form
operator ""X<'c1', 'c2', .. 'ck'>()
where n is the source character sequence c1c2...ck. [
Note 1:
The sequence
c1c2...ck can only contain characters from the basic character set. —
end note]
If S contains a literal operator
with parameter type long double, the literal L is treated as a call of
the form
operator ""X(fL)
Otherwise,
S shall contain a raw literal operator
or a numeric literal operator template (
[over.literal]) but not both
. If
S contains a raw literal operator,
the
literal L is treated as a call of the form
operator ""X("f")
Otherwise (
S contains a numeric literal operator template),
L is treated as a call of the form
operator ""X<'c1', 'c2', .. 'ck'>()
where f is the source character sequence c1c2...ck. [
Note 2:
The sequence
c1c2...ck can only contain characters from the basic character set. —
end note]
If
L is a
user-defined-string-literal,
let
str be the literal without its
ud-suffix
and let
len be the number of code units in
str
(i.e., its length excluding the terminating null character)
. If
S contains a literal operator template with
a constant template parameter for which
str is
a well-formed
template-argument,
the literal
L is treated as a call of the form
operator ""X<str>()
Otherwise, the literal L is treated as a call of the form
operator ""X(str, len)
S shall contain a
literal operator whose only parameter has
the type of
ch and the
literal
L is treated as a call
of the form
operator ""X(ch)
[
Example 2:
long double operator ""_w(long double);
std::string operator ""_w(const char16_t*, std::size_t);
unsigned operator ""_w(const char*);
int main() {
1.2_w;
u"one"_w;
12_w;
"two"_w;
}
—
end example]
During concatenation,
ud-suffixes are removed and ignored and
the concatenation process occurs as described in
[lex.string]. [
Example 3:
int main() {
L"A" "B" "C"_x;
"P"_x "Q" "R"_y;
}
—
end example]