Possible Duplicate:
C/C++: Static function in header file, what does it mean?
I have found a function in code that I am working with:
in msgparser.hpp
static inline msgEnum msg2enum(char *str)
{
msgEnum enumValue;
....
return enumValue;
}
The function parses the string and determines which enum it matches with from a pre-defined array of message strings.
It is a free function.
I know what inline
means - a hint to the compiler that the function should be inlined.
My questions are:
What does static
mean for a free function in a header?
Can it be meaningfully combined with inline
?