aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.brendan/template11.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.brendan/template11.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/template11.C48
1 files changed, 1 insertions, 47 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/template11.C b/gcc/testsuite/g++.old-deja/g++.brendan/template11.C
index 55fa2b20025..29b55ae70ac 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/template11.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/template11.C
@@ -1,47 +1 @@
-// Build don't link:
-// GROUPS passed templates
-template <class Called>
-class aCallback
-{
-public:
- aCallback(Called& obj, int (Called::*met)());
-
- int callback();
-
-protected:
-
-private:
- // the object to call
- Called& object;
-
- // the method to apply
- int (Called::*method)();
-
-};
-
-template <class Called>
-aCallback<Called>::aCallback(Called& obj,
- int (Called::*met)()) :
-object(obj),
-method(met)
-{};
-
-template <class Called>
-int aCallback<Called>::callback()
-{
- return (object.*method)();
-}
-
-struct myStruct
-{
- int action() {return 24;};
-};
-
-main()
-{
- myStruct toto;
-
- aCallback<myStruct> cb(toto, &myStruct::action);
-
- return cb.callback();
-}
+int main()