I wrote some VC++ specific optimizations in a library I maintain and I just want to make sure that I have the syntax correct. I don't own a Windows machine, nor does the office, so I can't do it myself.

Code:
#ifndef _MSC_VER
    #error, Not VC++
#endif

#pragma pack(push, foo_pack, 1)
class foo { 
    bool __declspec(nothrow) bar(void) const; 
};

bool __declspec(nothrow) foo::bar(void) const {
    return true;
}
#pragma pack(pop, foo_pack)


int main(void){ 
    return 0;
}