Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Compiler Warning (level 3) C4231

Error Message

nonstandard extension used : 'identifier' before template explicit instantiation

When Microsoft extensions are enabled (/Ze), an extern template can be instantiated, generating this warning. Under ANSI compatibility (/Za), such instantiations cause an error.

Example

// C4231.cpp
// compile with: /W3
template<class T, int i> class MyStack {}; // C4231
extern template MyStack< int, 4>;

int main()
{
}

Community Additions

ADD
Show:
© 2015 Microsoft