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
Rebase.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
var-templ1.C
blob
9219303737cd93bcaebab3698eb587ca21935cd5
1
// { dg-do run }
2
// { dg-options "-std=c++1y" }
3
4
template<int A, int B>
5
struct S1
6
{
7
static constexpr int a = A;
8
static constexpr int b = B;
9
};
10
11
template<typename T>
12
constexpr int var = T::a + T::b;
13
14
int main ()
15
{
16
int v = var<S1<199, 23>>/2;
17
return !(
18
var<S1<11, 100>> == v
19
&& var<S1<50, 120>> == var<S1<150, var<S1<10, 10>>>>
20
&& var<S1<53, 23>> != 222
21
);
22
}