mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
37 lines
668 B
C++
37 lines
668 B
C++
|
|
class IntVector;
|
|
|
|
class IntVectorIter {
|
|
public:
|
|
IntVectorIter (IntVector *p_vec, int pos);
|
|
bool operator!= (IntVectorIter& other);
|
|
int operator* ();
|
|
IntVectorIter& operator++ ();
|
|
};
|
|
|
|
class IntVector {
|
|
public:
|
|
IntVectorIter begin ();
|
|
IntVectorIter end ();
|
|
};
|
|
|
|
void cpp_range_based_for(void) {
|
|
IntVector vec;
|
|
int j = 0;
|
|
|
|
for (int i : vec)
|
|
j++;
|
|
}
|
|
|
|
class CopyConstructorClass {
|
|
public:
|
|
CopyConstructorClass();
|
|
~CopyConstructorClass();
|
|
CopyConstructorClass(const CopyConstructorClass &x);
|
|
};
|
|
|
|
CopyConstructorClass cpp_CopyConstructorClass(CopyConstructorClass x) {
|
|
return CopyConstructorClass(x);
|
|
}
|
|
|