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++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
overflow1.C
blob
b8591b4af413e94a94ca4717c5d3e6c705ee44d0
1
// { dg-prune-output "-Woverflow" }
2
3
template <long long i>
4
struct Fib
5
{
6
static const long long value // { dg-error "overflow" }
7
= Fib<i-1>::value + Fib<i-2>::value;
8
};
9
10
template <>
11
struct Fib<0>
12
{
13
static const long long value = 0;
14
};
15
16
template <>
17
struct Fib<1>
18
{
19
static const long long value = 1;
20
};
21
22
int main()
23
{
24
return Fib<95>::value;
25
}