Compiler Error C2710
'construct' : '__declspec(modifier)' can only be applied to a function returning a pointer
A function whose return value is a pointer is the only construct to which modifier
can be applied.
The following sample generates C2710:
// C2710.cpp
__declspec(restrict) void f(); // C2710
// try the following line instead
__declspec(restrict) int * g();
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for