File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
cpp/ql/test/library-tests/templates/typedefs Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ void functions() {
1212 b (static_cast <my_int>(0 ));
1313 c<int >(0 );
1414 d<my_int>(0 );
15-
15+
1616 e<int >(0 );
1717 e<my_int>(0 );
18-
18+
1919 f<my_int>(0 );
2020 f<int >(0 );
2121}
@@ -27,25 +27,35 @@ template <typename TD> struct D {};
2727template <typename TE> struct E {};
2828template <typename TF> struct F {};
2929template <typename TG> struct G {};
30+ template <typename TH> struct H {};
3031
3132struct S { int x; };
3233typedef S S_t;
3334
3435typedef C<int > C1;
3536typedef D<my_int> D1;
3637
38+ template <typename TZ>
39+ using Z = TZ;
40+
3741void types () {
3842 A<int >* a;
3943 B<my_int>* b;
4044 C1 c;
4145 D1 d;
42-
46+
4347 E<int > e1 ;
4448 E<my_int> e2 ;
45-
49+ E<Z<int >> e3 ;
50+
4651 F<my_int> f1;
4752 F<int > f2;
48-
53+ F<Z<int >> f3;
54+
55+ H<Z<int >> h1;
56+ H<my_int> h2;
57+ H<int > h3;
58+
4959 G<my_int*> g1;
5060 G<const my_int* const > g2;
5161 G<my_int**&> g3;
Original file line number Diff line number Diff line change 1212| F<int> | int |
1313| G<..(*)(..)> | pointer to {function returning {pointer to {int}} with arguments (int)} |
1414| G<TG> | TG |
15- | G<__attribute((vector_size(32))) int> | { GNU 8 element vector of {int} } |
15+ | G<__attribute((vector_size(32))) int> | GNU 8 element vector of {int} |
1616| G<const int *const> | const {pointer to {const {int}}} |
1717| G<int **&> | reference to {pointer to {pointer to {int}}} |
1818| G<int *> | pointer to {int} |
1919| G<int S::*> | pointer to member of S with type {int} |
2020| G<int(&)[3]> | reference to {array of 3 {int}} |
21+ | H<TH> | TH |
22+ | H<int> | int |
2123| a | Ta |
2224| a | int |
2325| b | Tb |
You can’t perform that action at this time.
0 commit comments