repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
noexcept84.C
blob
06f33264f77ccf2d6ff73d935a54289843ff0d76
1
// PR c++/114114
2
// { dg-do compile { target c++11 } }
3
4
template<bool B>
5
constexpr void
6
test ()
7
{
8
constexpr bool is_yes = B;
9
struct S {
10
constexpr S() noexcept(is_yes) { }
11
};
12
S s;
13
}
14
15
constexpr bool foo() { return true; }
16
17
template<typename T>
18
constexpr void
19
test2 ()
20
{
21
constexpr T (*pfn)() = &foo;
22
struct S {
23
constexpr S() noexcept(pfn()) { }
24
};
25
S s;
26
}
27
28
int main()
29
{
30
test<true>();
31
test2<bool>();
32
}