1 // PR c++/51188 2 // { dg-do compile } 3 4 #include <utility> 5 class XBase { 6 public: 7 virtual ~XBase() = 0; 8 enum ImpMode { Imp1, Imp2, Imp3 }; 9 }; 10 class X : public XBase { 11 class XBlock {}; 12 using XBase::ImpMode; 13 using XBase::Imp3; 14 using XBase::Imp1; 15 using XBase::Imp2; 16 int _XBlocked; getImp(void)17 std::pair<int,int> getImp(void) const { 18 return (std::make_pair(0, static_cast<int>(X::Imp1))); 19 } 20 }; 21