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
Implement C++11 inheriting constructors.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
inh-ctor3.C
blob
7116e2f0700a2929cc076bc3e1654332fd269540
1
// { dg-options -std=c++11 }
2
3
struct B1 {
4
B1(int);
5
};
6
struct B2 {
7
B2(int);
8
};
9
struct D1 : B1, B2 {
10
using B1::B1; // { dg-error "inherited" }
11
using B2::B2; // { dg-error "inherited" }
12
}; // ill-formed: attempts to declare D1(int) twice
13
struct D2 : B1, B2 {
14
using B1::B1;
15
using B2::B2;
16
D2(int); // OK: user declaration supersedes both implicit declarations
17
};