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-base3.C
blob
db867d4ef43e9f8b18679585004900e393553895
1
// PR c++/46526
2
// { dg-do run { target c++11 } }
3
4
struct Base
5
{
6
virtual int getid () = 0;
7
};
8
9
struct A : public Base
10
{
11
virtual int getid () { return 1; }
12
};
13
14
struct B : public Base
15
{
16
virtual int getid () { throw "here"; }
17
};
18
19
int
20
main ()
21
{
22
A a;
23
B b;
24
Base& ar = a;
25
ar.getid ();
26
}