This file contains 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 <stdio.h> | |
/* | |
* Simple template singleton base class | |
*/ | |
template<typename T> | |
class Singleton { | |
protected: | |
Singleton() = default; | |
Singleton(const Singleton&) = delete; |
This file contains 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 <typename T> | |
void test(T p) { | |
(*p)++; // increment by value | |
p++; // increment pointer to next element | |
} | |
void testrun1() | |
{ | |
int value[2] {0, 1}; | |
test<int *>(&value[0]); // 1. compiles and runs successfuly |
This file contains 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 <everything> | |
template <typename AnyThing> | |
[[ noreturn ]] void blackhole(AnyThing *obj) | |
{ | |
delete obj; | |
} |
This file contains 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
// MersenneTwisterSeedFinder.cpp | |
// Copyright (c) Oguzhan KATLI. All rights reserved. | |
#include <random> | |
#include <string> | |
#include <iostream> | |
#include <thread> | |
#include <vector> | |
#include <numeric> | |
#include <algorithm> |
This file contains 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 <string> | |
#include <memory> | |
#include <cassert> | |
template <class T> | |
class Singleton | |
{ | |
public: | |
using Type = typename std::remove_all_extents<T>::type; |
This file contains 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> | |
namespace dtl // detail | |
{ | |
template <typename T1, typename T2 = T1> | |
struct carpma_t { | |
typedef T1 tipi; | |
}; | |
template <> |
This file contains 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 <string> | |
#include <string_view> | |
#include <vector> | |
#include <algorithm> | |
#include <execution> | |
using namespace std; | |
// fix mesaj tag'leri için kullanılacak parser sınıflarının deklerasyonları |
This file contains 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 <benchmark/benchmark.h> | |
#include <iostream> | |
#include <random> | |
#include <algorithm> | |
#include <vector> | |
#include <chrono> | |
#include <iterator> | |
#include <execution> | |
static void count_if_random(benchmark::State& state) |
This file contains 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 <memory> | |
#include <thread> | |
#include <mutex> | |
#include <future> | |
#include <condition_variable> | |
#include <functional> | |
#include <vector> | |
#include <deque> | |
#include <type_traits> |
This file contains 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> | |
#include <string> | |
#include <string_view> | |
#include <chrono> | |
#include <random> | |
#include <range/v3/all.hpp> | |
#include <ranges> | |
using namespace std; |
OlderNewer