H
Hicham Mouline
hi,
I include a header file from 2 translation units. In this header file , I
have a "policy" class with only static member functions:
class C {
static double f1() { return 6.0; }
static bool f2() { return true; }
};
I would like to hint to the compiler to inline these functions.
I think i have read somewhere that functions defined in-class are
automatically hinted as inline... And i don't need to add the "inline"
keyword, and that i should add inline when the functions are defined
out-of-class, as:
class C {
static double f1();
static bool f2();
};
inline double C::f1()
{
return 6.0;
}
inline double C::f2()
{
return true;
}
regards,
I include a header file from 2 translation units. In this header file , I
have a "policy" class with only static member functions:
class C {
static double f1() { return 6.0; }
static bool f2() { return true; }
};
I would like to hint to the compiler to inline these functions.
I think i have read somewhere that functions defined in-class are
automatically hinted as inline... And i don't need to add the "inline"
keyword, and that i should add inline when the functions are defined
out-of-class, as:
class C {
static double f1();
static bool f2();
};
inline double C::f1()
{
return 6.0;
}
inline double C::f2()
{
return true;
}
regards,