diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-04 20:18:05 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-04 20:18:05 +0000 |
commit | 611ca89a42e7562251af3343e9922bc8d59eaf74 (patch) | |
tree | b8e61e3eed80ab5a4bfb8bd4b19c07b43f0f5fb8 /gcc/testsuite/g++.dg | |
parent | ecce391740b84bfa5f666614fa34707e867cad04 (diff) | |
download | gcc-611ca89a42e7562251af3343e9922bc8d59eaf74.tar.gz |
PR c++/31419
* call.c (reference_binding): Don't look for user-defined conversions
to the same type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128102 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/conversion/self1.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/conversion/self1.C b/gcc/testsuite/g++.dg/conversion/self1.C new file mode 100644 index 00000000000..f36500a9fa5 --- /dev/null +++ b/gcc/testsuite/g++.dg/conversion/self1.C @@ -0,0 +1,15 @@ +// PR c++/31419 + +struct B +{ + template<typename T> + operator T const& () const + { + return 42; + } +}; + +B f() +{ + return B(); +} |