Compiler Error C3189

 

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 C3189.

typeid<type abstract declarator>': this syntax is no longer supported, use ::typeid instead

An obsolete form of typeid was used, use the new form.

The following sample generates C3189:

// C3189.cpp  
// compile with: /clr  
int main() {  
   System::Type^ t  = typeid<System::Object>;   // C3189  
   System::Type^ t2  = System::Object::typeid;   // OK  
}  

Show: