The following code compiles with g++ 4.7.1 but not clang 3.1
struct A
{
int foo();
};
int A::foo() __restrict
{
return 0;
}
int main(int argc, char * argv[])
{
A a;
return a.foo();
}
Does clang support __restrict
? or is it using a particular syntax?
I don't have clang 3.1 handy, but under clang 4.1, I get this error:
clang 4.1 compiles it successfully if I change the declaration of
A::foo
to this: