Commit d2474533 by Jason Merrill

new

From-SVN: r34289
parent 6fbc37cc
// Origin: Jason Merrill <jason@redhat.com>
struct A
{
A ();
explicit A (int);
};
int main ()
{
const A& r = 1; // ERROR - no suitable constructor
}
// Test that we don't allow multiple user-defined conversions in reference
// initialization.
// Build don't link:
struct B { };
struct A {
A (const B&);
};
struct C {
operator B ();
};
C c;
const A& ref (c); // ERROR - requires two UDCs
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment