次の方法で共有


コンパイラは、複合式または型を区別します。

次の例では標準で指定された Visual C++ .NET 2003 以降で動作します :

// compiler_correctly_disambiguates_complex_expressions_or_types.cpp
// Many different variations, this is a simple one
#include <typeinfo>
typedef void functype();
int main()
{
   return !(typeid(functype) == typeid(void()));
   //now these match correctly
}

参照

その他の技術情報

Visual C++ .NET 2003 では、コンパイラ準拠が強化