File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
cpp/ql/lib/semmle/code/cpp/models/implementations Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,16 @@ private class IteratorByTraits extends Iterator {
3434 IteratorByTraits ( ) { exists ( IteratorTraits it | it .getIteratorType ( ) = this ) }
3535}
3636
37+ /**
38+ * The C++ standard includes an `std::iterator_traits` specialization for pointer types. When
39+ * this specialization is included in the database, a pointer type `T*` will be an instance
40+ * of the `IteratorByTraits` class. However, if the `T*` specialization is not in the database,
41+ * we need to explicitly include them with this class.
42+ */
43+ private class IteratorByPointer extends Iterator instanceof PointerType {
44+ IteratorByPointer ( ) { not this instanceof IteratorByTraits }
45+ }
46+
3747/**
3848 * A type which has the typedefs expected for an iterator.
3949 */
You can’t perform that action at this time.
0 commit comments