From c067f4dbc095a2471388aadcf7632520b482f60e Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 20 Sep 2011 15:25:32 -0400 Subject: [PATCH] re PR c++/50442 (Constructing T from implicit conversion to T& ambiguous in C++0x mode, not C++98) PR c++/50442 * g++.dg/overload/ref-conv1.C: New. From-SVN: r179015 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/overload/ref-conv1.C | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 gcc/testsuite/g++.dg/overload/ref-conv1.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bd543b07811..85a4acbf988 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-09-20 Jason Merrill + + PR c++/50442 + * g++.dg/overload/ref-conv1.C: New. + 2011-09-20 Roberto Agostino Vitillo * g++.dg/other/final1.C: new test diff --git a/gcc/testsuite/g++.dg/overload/ref-conv1.C b/gcc/testsuite/g++.dg/overload/ref-conv1.C new file mode 100644 index 00000000000..7e141141264 --- /dev/null +++ b/gcc/testsuite/g++.dg/overload/ref-conv1.C @@ -0,0 +1,6 @@ +// PR c++/50442 + +template struct MoveRef { operator T& () {} }; +template MoveRef Move(T&) {} +struct Thing {}; +Thing foo(const Thing* p) { return Thing(Move(*p)); }