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
/
var-templ3.C
blob
254f388acee6ef5627a82d49b9f68660dd06d4c2
1
// { dg-do compile { target c++14 } }
2
3
template<typename T>
4
constexpr int var = sizeof (T);
5
6
template<typename T>
7
struct S1
8
{
9
template<typename U>
10
static constexpr int a = sizeof (U) + sizeof (T);
11
};
12
13
int main ()
14
{
15
static_assert(var<int> + var<char> == S1<int>::a<char>, "");
16
}