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
std::optional<const sf::Event> poll(sf::RenderWindow &rw) | |
{ | |
if (f::Event e; rw.pollEvent(e)) | |
{ | |
return e; | |
} | |
return std::nullopt; | |
} | |
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 <assert.h> | |
#include <thread> | |
#include <atomic> | |
#include <vector> | |
#include <chrono> | |
#include <iostream> | |
#include <optional> | |
template <class T, size_t 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 <string> | |
#include <iostream> | |
#include <array> | |
class Foo | |
{ | |
public: | |
Foo() : i(42), d(44.0) {} | |
template<typename T> |
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 <array> | |
enum Log_level | |
{ | |
L_SILENT = 0, | |
L_ERROR = 1, | |
L_INFO = 2, | |
L_DEBUG = 3, | |
}; |
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 <assert.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
struct node | |
{ | |
int data; | |
struct node* parent; | |
struct node* left; |
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 <algorithm> | |
#include <cassert> | |
#include <cstring> | |
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#if defined(VK_USE_PLATFORM_WIN32_KHR) | |
#elif defined(VK_USE_PLATFORM_ANDROID_KHR) | |
#elif defined(VK_USE_PLATFORM_WAYLAND_KHR) |
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
set(CMAKE_SYSTEM_NAME Linux) | |
set(CMAKE_SYSTEM_PROCESSOR "x86_64") | |
# Because build platform is different than target platform | |
set(CMAKE_CROSSCOMPILING TRUE) | |
set(TOOLCHAIN_USED "NI LinuxRT SDK 2017") | |
# Generator is force to Unix Makefiles to generate a makefiles | |
# Otherwise Visual Studio generator is there by default because |
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 <cassert> | |
template<typename T, int nrows, int ncols> | |
class StackMatrix | |
{ | |
public: | |
StackMatrix() | |
{ | |
static_assert(ncols != 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> | |
#include <string> | |
#include <memory> | |
struct Foo | |
{ | |
Foo(int size) : words(size, "Foo") | |
{} | |
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 <string> | |
#include <vector> | |
#include <tuple> | |
#include <iostream> | |
#include <experimental/tuple> | |
#define HI std::cout << __PRETTY_FUNCTION__ << '\n'; | |
template <class Sig> | |
struct MsgQueue; |
NewerOlder