Re: RefPtr and inheritance
- From: Robert Caryl <bob fis-cal com>
- To: Atma <fcamblor gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: RefPtr and inheritance
- Date: Sat, 07 Oct 2006 12:30:42 -0500
<snip>
> Glib::RefPtr refB = Glib::RefPtr(new B());
> Glib::RefPtr refA = Glib::RefPtr (refB);
<snip>
If the foregoing actually appears in your code, I wonder how it
successfully compiles since you didn't define a template for
Glib::RefPtr<T>.
It should be written:
Glib::RefPtr<B> refB = B::create();
Glib::RefPtr<A> refA = refB;
The foregoing assumes that class B has a create function.
Bob Caryl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]