diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-04 11:30:06 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-04 11:30:06 +0000 |
commit | bab00ab130b2570d0a3319d4f79770890fda9b8b (patch) | |
tree | 1395990e284717f4831de3f2654ce356905a48f2 /gcc/testsuite | |
parent | 328496b171c21400e940929d0389c1a7d3bf881a (diff) | |
download | gcc-bab00ab130b2570d0a3319d4f79770890fda9b8b.tar.gz |
PR c++/11713
* search.c (setup_class_bindings): Handle conversion operators
specially.
PR c++/11713
* g++.dg/overload/operator1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70136 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.dg/overload/operator1.C | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/overload/operator1.C b/gcc/testsuite/g++.dg/overload/operator1.C new file mode 100644 index 00000000000..f4d1f53f14e --- /dev/null +++ b/gcc/testsuite/g++.dg/overload/operator1.C @@ -0,0 +1,34 @@ +typedef struct _GdkDrawable GdkDrawable; +typedef struct _GdkDrawable GdkBitmap; +typedef struct _GdkDrawable GdkPixmap; + +class Drawable +{ +public: + operator GdkDrawable* () const; +}; + + +class Pixmap : public Drawable +{ +public: + operator GdkPixmap* () const; + +}; + + +class Bitmap : public Pixmap +{ +public: + operator GdkBitmap* () const; + +}; + +class Event +{ +}; + +Bitmap::operator GdkBitmap* () const +{ + return 0; +} |