I just threw
in a .h file in my project and recompiled, no errors.
In the project settings, you can set it to compile based on the file type, or you can force it to compile everything as Objective-C++.
I do the later with no problems; what is your settting?