Initializer list issue
From: Christopher Benson-Manica (ataru_at_nospam.cyberspace.org)
Date: 04/30/04
- Next message: Christopher Benson-Manica: "Re: Pointers to member functions and default parameters"
- Previous message: Christopher Benson-Manica: "Re: "Run-Time Check Failure #2" on Xerces & Xalan (Bug?)"
- Next in thread: John Harrison: "Re: Initializer list issue"
- Reply: John Harrison: "Re: Initializer list issue"
- Reply: Jeff Schwab: "Re: Initializer list issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Apr 2004 12:44:27 +0000 (UTC)
I recently had an issue that I'll try to condense for your reviewing
pleasure:
class A
{
protected:
my_type Member;
public:
A() {/* initialize Member */}
};
class B : public A
{
private:
my_other_type MyMember;
public:
B() : A(), MyMember(Member) {}
};
This compiled, but crashed at run time. Was it because the order in
which the actions in the initializer list are taken is unspecified?
-- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
- Next message: Christopher Benson-Manica: "Re: Pointers to member functions and default parameters"
- Previous message: Christopher Benson-Manica: "Re: "Run-Time Check Failure #2" on Xerces & Xalan (Bug?)"
- Next in thread: John Harrison: "Re: Initializer list issue"
- Reply: John Harrison: "Re: Initializer list issue"
- Reply: Jeff Schwab: "Re: Initializer list issue"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|