>>And I also know that it's not allowed to declare functions in headers unless they are inlined
Wrong -- see your second example.
>>Will it still be inlined?
No (assuming lines 6-16 are in a *.cpp file and not *.h; there will be lots of other problems if you put that code in a *.h file).
>>And is there a keyword to explicitly specify to make any function not-inlined?
No. The default is not inlined. A method is only inlined if you explicitly ask it to be with the inline keyword or by coding it as in your first example. Even then there is no guarantee that the compiler will inline the code, inline keyword is only a HINT to the compiler, not a requirement.