This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
#include <iostream> enum class myEnum : int { A, B, C, }; class foo { public: int field; }; int main( int argc, char** argv ) { foo arr[] = { 100, 200, 400 }; int a = arr[ 0 ].field; // OK int b = arr[ (int) myEnum::A ].field; // OK int c = arr[ static_cast<int>(myEnum::A) ].field; // field highlighted as unable to resolve int d = arr[ static_cast<int>(0) ].field; // field highlighted as unable to resolve std::cout << a << " " << b << " " << c << " " << d << std::endl; return 0; } This is C++11 code, but thing like this "int d = arr[ static_cast<int>(0) ].field;" don't work aslo in c++98. Ubuntu 13.10 x64. g++ version 4.8.1
Fixed in http://hg.netbeans.org/cnd-main/rev/e88e7ca51dd3
Integrated into 'main-silver', will be available in build *201404090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/e88e7ca51dd3 User: Petr Kudryavtsev <petrk@netbeans.org> Log: Fixed #243600 - static_cast<int> do not work as casting to int
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/ba20fed8369f User: Petr Kudryavtsev <petrk@netbeans.org> Log: Fixed #243600 - static_cast<int> do not work as casting to int (transplanted from e88e7ca51dd3071fed0e258e3c938461f7aa0539)