Compiler Error C2714

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C2714.

__alignof(void) is not allowed

An invalid value was passed to an operator.

See __alignof Operator for more information.

The following sample generates C2714.

// C2714.cpp  
int main() {  
   return __alignof(void);   // C2714  
   return __alignof(char);   // OK  
}  

Show: