gtkutil.c (xg_modify_menubar_widgets): If menubar is totally empty
[emacs.git] / test / cedet / tests / testtemplates.cpp
blob4e0f0e4abfa27db220e7e36644bed7194e96a52f
1 // Templates Test file:
2 // Written by 'Raf'
4 template <class T, int U, class V>
5 class read_ref {
6 public:
7 const T* read_ref_member_one( T);
8 const V* read_ref_member_two();
9 };
11 namespace NS {
12 template <class T, int U, class V>
13 class ref {
14 public:
15 read_ref<T,10,V> operator->() {
16 m_// -1-
18 // #1# ( "m_datas" )
21 private:
22 T m_datas[U];
27 class FooOne {
28 public:
29 int fooOneMember();
32 class FooTwo {
33 public:
34 int fooTwoMember();
37 class FooThree {
38 public:
39 int fooThreeMember();
41 FooOne * operator->();
44 typedef ref<FooOne, 10,FooTwo> Test;
46 using NS;
48 void
49 main(void) {
50 ref<FooOne, 10, FooTwo> v;
52 v->read_ref_member_one()-> // -2-
54 // #2# ( "fooOneMember" )
56 v->read_ref_member_two()-> // -3-
58 // #3# ( "fooTwoMember" )
60 v-> // -4-
62 // #4# ( "read_ref_member_one" "read_ref_member_two" )
64 Test t;
66 t->read_ref_member_two()-> // -5-
68 // #5# ( "fooTwoMember" )
70 ref<FooOne, 10, FooThree> v2;
72 v2->read_ref_member_two()-> // -6-
74 // #6# ( "fooOneMember" )
76 /* Try all these things by also specifying the namespace in the name. */
77 NS::ref<FooOne, 10, FooTwo> v3;
79 v3->read_ref_member_one()-> // -7-
81 // #7# ( "fooOneMember" )
83 v3->read_ref_member_two()-> // -8-
85 // #8# ( "fooTwoMember" )
87 v3->read_ref_member_two// @1@ 5
92 // arch-tag: 03cbb8c3-3d01-42ab-b416-42a08ea7b896