Re: Usage of pointer to object under construction
From: Victor Bazarov (v.Abazarov_at_comAcast.net)
Date: 01/11/05
- Next message: Eric: "Re: [Q] Deriving from templates"
- Previous message: Victor Bazarov: "Re: [Q] Deriving from templates"
- In reply to: Dave: "Usage of pointer to object under construction"
- Next in thread: Dave: "Re: Usage of pointer to object under construction"
- Reply: Dave: "Re: Usage of pointer to object under construction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 11 Jan 2005 12:04:57 -0500
Dave wrote:
> In the code below, I use a pointer to an object under construction. Is the
> usage below legal? I have come across similar code at work. It compiles,
> but I'm not sure it's really legal...
>
> Thanks,
> Dave
>
> struct D;
>
> struct B
> {
> B(D *);
> };
>
> struct D: B
> {
> D(): B(this) {}
> };
There is no _usage_ here. To show _usage_ you need to post the _body_ of
the B's constructor.
Victor
- Next message: Eric: "Re: [Q] Deriving from templates"
- Previous message: Victor Bazarov: "Re: [Q] Deriving from templates"
- In reply to: Dave: "Usage of pointer to object under construction"
- Next in thread: Dave: "Re: Usage of pointer to object under construction"
- Reply: Dave: "Re: Usage of pointer to object under construction"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|