Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
class A {
public:
A() {std::cout <<"A()\n";}
A(const A& o) {
std::cout <<"copy const\n";
}
A operator =(const A& o) {
#include <unordered_set>
#include <iostream>
template <class T, unsigned size>
bool findSum(T (&a)[size], T v, T& i1, T& i2) {
std::unordered_set<T> m;
for (unsigned i = 0; i < size; ++i) {
auto it = m.find(a[i]);
if (it == m.end()) {
#include <mutex>
#include <thread>
#include <iostream>
#include <cassert>
#include <condition_variable>
using namespace std;
typedef float TCurrency;
const TCurrency empty = 0;
#include <iostream>
struct A{
void duck() {
std::cout <<"crya\n";
}
};
typedef void (A::*Call)();
void call(A* a, Call c) {