|
From: todma on 17 Apr 2008 03:06 If a member function is not called it is not generated. If a member function is called by another member function (ad infinitum) ..... ....(Question:) Is it generated or does the compiler trace through all of the calling member functions and finding NO external call, not generate any of the functions in the calling sequence? Thanks Todd. I guess the other question is: if Class1::A() is called by Class2::B() but Class2::B() is not called, is Class1::A() generated? -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
From: Mathias Gaunard on 17 Apr 2008 07:15 On 17 avr, 20:06, todma <toddmarshall2...(a)yahoo.com> wrote: > If a member function is not called it is not generated. That's only true for member functions of template classes. -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
From: markus2004x on 17 Apr 2008 10:31 In windows, it is always compiled, but not included in the final executable by the linker (unless you are producing a dll and you have marked that method for export). On Apr 17, 7:06 pm, todma <toddmarshall2...(a)yahoo.com> wrote: > If a member function is not called it is not generated. > If a member function is called by another member function (ad > infinitum) ..... > ...(Question:) Is it generated or does the compiler trace through all > of the calling member functions and finding NO external call, not > generate any of the functions in the calling sequence? > Thanks > Todd. > > I guess the other question is: if Class1::A() is called by Class2::B() > but Class2::B() is not called, is Class1::A() generated? > > -- > [ Seehttp://www.gotw.ca/resources/clcm.htmfor info about ] > [ comp.lang.c++.moderated. First time posters: Do this! ] -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ]
|
Pages: 1 Prev: communication between classes Next: Problems with exception-handling gcc 3.3 Suse 8.2 |