RE: [Doxygen-users] (no subject)
Brought to you by:
dimitri
From: Paul B. <pee...@ya...> - 2002-01-16 17:08:41
|
Kris, Victor, Thanks, but I don't know if I agree with what has been said. In the first case (below), I assume we all agree that even though I did not explicitly say 'inline', the compiler might choose to inline a method. But my second case is very similar - the definitions are still in the header file, they are simple placed outside the main class declaration. So why should the compiler not choose to inline them anyway? After all all the information is still there, in the header file, at compile time. Now there may be a reason it doesn't do this, which is what my question is about. But I cannot see that my use of the 'inline' keyword is going to help. This is just a suggestion, after all, not binding on the compiler. Is there a hard rule somewhere that if the method definition is separate from the method declaration, but still in the include file, it will not be inlined unless 'inline' is used? Thanks, Paul. ----------FIRST CASE----------------------- class A { public: int method1 () const {return simple_thing;} void method2 () {do_something_simple ();} }; ----------END FIRST CASE----------------- ----------SECOND CASE-------------------- class A { public: int method1 (); void method2 (); }; /** * Blah * @return blah */ int A::method1 () const {return simple_thing;} /** * Blah2 */ void A::method2 () {do_something_simple ();} ---------END SECOND CASE----------------------- __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ |