mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
C++: Add getTemplateClass to DeductionGuide
This commit is contained in:
18
cpp/ql/test/library-tests/deduction_guides/test.cpp
Normal file
18
cpp/ql/test/library-tests/deduction_guides/test.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
// semmle-extractor-options: -std=c++20
|
||||
|
||||
template<typename T>
|
||||
struct C {
|
||||
C(const T);
|
||||
};
|
||||
|
||||
C(const double) -> C<int>;
|
||||
|
||||
template<typename T>
|
||||
C(const T) -> C<int>;
|
||||
|
||||
void test() {
|
||||
new C<char>(0);
|
||||
new C<int>(0);
|
||||
new C(0.0f);
|
||||
new C(0.0);
|
||||
}
|
||||
Reference in New Issue
Block a user