This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sizeof(int) = 4 | |
sizeof(long long) = 8 | |
sizeof(int*) = 4 | |
a[5] = 5 | |
5[a] = 5 | |
a[5LL] = 5 | |
5LL[a] = 5 | |
i = 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
class Base { | |
private: | |
class Child { | |
private: | |
int member; | |
Child(): member(6) {} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone [email protected]:cammckinnon/CS240-Test-Cases.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class A> | |
class Outer { | |
public: | |
class Inner { | |
public: | |
template <class C> | |
void foo(Outer<C>::template Inner innerC) { } | |
}; | |
Inner inner; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class A> | |
class Outer { | |
public: | |
template <class B> | |
class Inner { | |
public: | |
template <class C> | |
void foo(Outer<C>::template Inner<C> innerC) { } | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class A> | |
class Outer { | |
public: | |
template <class B> | |
class Inner { | |
public: | |
template <class C> | |
void foo(typename Outer<C>::template Inner<C> innerC) { } | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
std::vector<bool> v; | |
int main() { | |
v.push_back(true); | |
bool& r = v[0]; | |
r = false; | |
std::cout << v[0] << "\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
std::vector<bool> v; | |
bool& first() { | |
return v[0]; | |
} | |
int main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
std::vector<bool> v; | |
int main() { | |
v.push_back(true); | |
auto r = v[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
std::vector<bool> v; | |
decltype(v[0]) first() { | |
return v[0]; | |
} | |
int main() { |