31 lines · c
1#ifndef _T_H_2#define _T_H_3 4extern int some_val;5 6namespace NS {7 class C {8 void method_decl();9 int method_def1() { ++some_val; return undef_val1; }10 inline int method_def2();11 };12}13 14inline int NS::C::method_def2() {15 ++some_val; return undef_val2;16}17 18static inline int foo1() {19 ++some_val; return undef_val3;20}21 22#ifdef BLAH23 24static inline int foo2() {25 ++some_val; return undef_val4;26}27 28#endif29 30#endif31