Sign in
gnu
/
gcc
/
refs/heads/devel/c++-contracts
/
.
/
gcc
/
testsuite
/
g++.dg
/
init
/
ref4.C
blob: 6b65d9925ab119e736ce2e93823b7edef2acfa2b [
file
] [
log
] [
blame
]
// { dg-do run }
int
c
;
struct
Base
{
Base
()
{}
Base
(
const
Base
&)
{
++
c
;
}
Base
&
operator
=
(
const
Base
&);
};
struct
Derived
:
public
Base
{};
const
Base
&
b
=
Derived
();
int
main
()
{
return
c
;
// No copies should be required.
}