H
hsharsha
I have a query. Please help me out as soon as possible.
Consider the below code snippet:
/* code begins */
__declspec(dllimport) int myvariable;
template<const int *p>
class MyClass{
public:
static void myfunction(){
}
};
int main(void){
MyClass<&myvariable>::myfunction();
return 0;
}
/* end of code */
Will the adderss of myvariable be treated as a constant ???
Consider the below code snippet:
/* code begins */
__declspec(dllimport) int myvariable;
template<const int *p>
class MyClass{
public:
static void myfunction(){
}
};
int main(void){
MyClass<&myvariable>::myfunction();
return 0;
}
/* end of code */
Will the adderss of myvariable be treated as a constant ???