mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
21 lines
517 B
C++
21 lines
517 B
C++
#include "../../../include/iterator.h"
|
|
int source();
|
|
|
|
template<typename T>
|
|
void sink(T);
|
|
|
|
template<> struct std::iterator_traits<unsigned long>
|
|
{ // get traits from integer type
|
|
typedef std::input_iterator_tag iterator_category;
|
|
typedef unsigned long value_type;
|
|
typedef unsigned long difference_type;
|
|
typedef unsigned long distance_type;
|
|
typedef unsigned long * pointer;
|
|
typedef unsigned long& reference;
|
|
};
|
|
|
|
|
|
int iterator_test() {
|
|
unsigned long x = source();
|
|
sink(x); // $ ast ir
|
|
} |