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
/
constexpr-throw.C
blob
5666629acae9fba6dca8c902fa823449075d3636
1
// { dg-do compile { target c++11 } }
2
3
constexpr int may_throw(bool decide) {
4
return decide ? 42 : throw -1; // { dg-error "throw" }
5
}
6
7
constexpr int x = may_throw(false); // { dg-message "may_throw" }
8
constexpr int y = may_throw(true);