Skip to content

Commit 972d9ca

Browse files
committed
C++: Add more deduction guide tests
1 parent 4dcf679 commit 972d9ca

File tree

6 files changed

+13
-3
lines changed

6 files changed

+13
-3
lines changed

cpp/ql/test/library-tests/deduction_guides/missing_template_class.expected

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import cpp
2+
3+
from DeductionGuide d
4+
where not exists(d.getTemplateClass())
5+
select d
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
| file://:0:0:0:0 | C | test.cpp:4:8:4:8 | C<T> |
2+
| file://:0:0:0:0 | C | test.cpp:4:8:4:8 | C<T> |
3+
| test.cpp:5:5:5:5 | (unnamed deduction guide) | test.cpp:4:8:4:8 | C<T> |
4+
| test.cpp:6:5:6:5 | (unnamed deduction guide) | test.cpp:4:8:4:8 | C<T> |
5+
| test.cpp:12:1:12:1 | C | test.cpp:4:8:4:8 | C<T> |

cpp/ql/test/library-tests/deduction_guides/test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
template<typename T>
44
struct C {
55
C(const T);
6+
C(char, char);
67
};
78

89
C(const double) -> C<int>;
910

1011
template<typename T>
1112
C(const T) -> C<int>;
1213

14+
C(char, char) -> C<char>;
15+
1316
void test() {
1417
new C<char>(0);
1518
new C<int>(0);

cpp/ql/test/library-tests/deduction_guides/test.expected

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)