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.
Sample: namespace one { struct S { enum { A = 1, B = 2 }; struct T { enum { B = 102 }; enum class E1; enum E2 : int; }; }; enum class S::T::E1 { A1 = A, B1 = B, C1 }; enum S::T::E2 : int { A1 = A, B1 = B, C1 }; static_assert(int(S::T::E1::A1) == 1, "error"); static_assert(int(S::T::E1::B1) == 102, "error"); static_assert(int(S::T::E1::C1) == 103, "error"); static_assert(int(S::T::E2::A1) == 1, "error"); static_assert(int(S::T::E2::B1) == 102, "error"); static_assert(int(S::T::E2::C1) == 103, "error"); static_assert(int(S::T::A1) == 1, "error"); static_assert(int(S::T::B1) == 102, "error"); static_assert(int(S::T::C1) == 103, "error"); } namespace two { namespace S { enum { A = 1, B = 2 }; namespace T { enum { B = 102 }; enum class E1; enum E2 : int; } } enum class S::T::E1 { A1 = A, B1 = B, C1 }; enum S::T::E2 : int { A1 = A, B1 = B, C1 }; static_assert(int(S::T::E1::A1) == 1, "error"); static_assert(int(S::T::E1::B1) == 102, "error"); static_assert(int(S::T::E1::C1) == 103, "error"); static_assert(int(S::T::E2::A1) == 1, "error"); static_assert(int(S::T::E2::B1) == 102, "error"); static_assert(int(S::T::E2::C1) == 103, "error"); static_assert(int(S::T::A1) == 1, "error"); static_assert(int(S::T::B1) == 102, "error"); static_assert(int(S::T::C1) == 103, "error"); } Sample 2: template<typename T> struct S1 { enum E1 : int; enum E1 : T; enum class E2 : int; enum class E2 : T; }; template<typename T> enum S1<T>::E1 : int { e1 }; template<typename T> enum class S1<T>::E2 : T { e2 }; S1<int>::E1 x1 = S1<int>::e1; S1<int>::E1 x11 = S1<int>::E1::e1; S1<int>::E2 x2 = S1<int>::E2::e2; enum S1<int>::E1 ex1 = S1<int>::e1; enum S1<int>::E1 ex11 = S1<int>::E1::e1; enum S1<int>::E2 ex2 = S1<int>::E2::e2; Sample 3: template<typename T> struct S1 { enum E1 : int; enum class E2 : int; }; template<typename T> enum S1<T>::E1 : int { e1 }; template<typename T> enum class S1<T>::E2 : T { e2 }; template<> enum S1<int>::E1 : int { i1 }; template<> enum class S1<int>::E2 : int { i2 }; S1<char>::E1 xci = S1<char>::e1; S1<int>::E1 xi1 = S1<int>::i1; S1<char>::E2 xc2 = S1<char>::E2::e2; S1<int>::E2 xi2 = S1<int>::E2::i2; Sample 4: enum struct E3 e4;
will investigate
Integrated into 'main-golden', will be available in build *201205250002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/3751b18e4cdc User: Vladimir Voskresensky <vv159170@netbeans.org> Log: fixing #212124 - C++11 enum forwards - introduce enum forward declarations