diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/templates.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/templates.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/templates.cc b/gdb/testsuite/gdb.cp/templates.cc index d6120e2..d5b24af 100644 --- a/gdb/testsuite/gdb.cp/templates.cc +++ b/gdb/testsuite/gdb.cp/templates.cc @@ -690,6 +690,18 @@ int gf2 (int a) { char string[3]; +// Template class with typedefs and const attributes. +template<typename DataT> +class Cfoo +{ + typedef float myfloat; +public: + DataT me0; + const DataT me1=1; + const myfloat me2=2.0; + const int me3=0; +}; + // Template for nested instantiations @@ -778,6 +790,8 @@ int main() sic.spec ('c'); siip.spec (&x); + Cfoo<double> cfoo; + Garply<int> f; Garply<char> fc; f.x = 13; |