1 // { dg-do assemble  }
2 // PRMS Id: 3764 (c/h)
3 // Bug: g++ gets into an infinite loop trying to find the top-level context
4 
5 class Menu;
6 class MenuItem;
7 
8 class MenuAction {
9 public:
10   virtual void execute (Menu& menu, MenuItem& menuItem) = 0;
11 protected:
MenuAction()12   MenuAction () {}
13 };
14 
15 class Test {
16   class MenuCBA : public MenuAction {
17   public:
18     typedef void (Test::* MenuCBA_Member) (Menu& menu, MenuItem& menuItem);
MenuCBA(Test & instance,MenuCBA_Member member)19     MenuCBA (Test& instance, MenuCBA_Member member)
20       : _instance(&instance), _member(member) {	}
21     void execute (Menu& menu, MenuItem& menuItem);
22   private:
23     MenuCBA_Member _member;
24     Test* _instance;
25   };
26 };
27