Problem with cudafee++ and templates

Hi,

I am using CUDA with VS 2008 on Vista. The following code gives error when I compile it with nvcc. For some reasons, after the compilation by cudafe++, the __alignof operator inside the template function gets converted to alignof and I am getting an error since alignof is not defined. This problem doesn’t happen if I don’t use a template b’coz the __alignof operator gets evaluated before it reaches cudafe++. Has anyone else faced this problem or have a solution for it? (I tried to go through all possible header files to find where __alignof would be defined as alignof. But I could not find any.)

Thanks in advance :)
(PS: I got a similar error when I tried to use CUDA with TBB. This sample program reproduces the error.)

Thanks,
Balaji

#include <stdio.h>

class A{
int a;double b;
};

template
void myfunc()
{
printf(“\nAlignof: %d\n”,__alignof(T));
}

int main()
{
myfunc();
return 0;
}