repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/56973, DR 696 - capture constant variables only as needed.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
udlit-char-template-vs-std-literal-operator.C
blob
6e3ffe4ecd359cabbce287180110758a5d32ad4e
1
// { dg-do run { target c++14 } }
2
3
#include <cassert>
4
5
typedef decltype(sizeof(0)) size_type;
6
7
template<typename CharT, CharT... String>
8
int operator"" _script () {
9
return 1;
10
}
11
12
int operator"" _script (const char*, size_type) {
13
return 2;
14
}
15
16
int main ()
17
{
18
assert ("123"_script == 2);
19
}