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 <cstdio> | |
| extern "C" const char arr[]; | |
| asm( | |
| #include "foo" | |
| ); | |
| /* Assume that the file "foo" has the content: | |
| R"( |
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
| struct coroutine { | |
| struct promise_type; | |
| using handle_type = coroutine_handle<promise_type>; | |
| struct promise_type { | |
| coroutine get_return_object() | |
| { return { coroutine::handle_type::from_promise(*this) }; } | |
| suspend_always initial_suspend () noexcept { return {}; } | |
| suspend_always final_suspend () noexcept { return {}; } |
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 <glad/glad.h> | |
| #include <GLFW/glfw3.h> | |
| #include <glm/glm.hpp> | |
| #include <glm/gtc/type_ptr.hpp> | |
| const char * vertex_shader_src = | |
| R"(#version 330 core | |
| layout (location = 0) in vec2 vertex; | |
| uniform mat4 ortho; |
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 <fmt/core.h> | |
| #include <algorithm> | |
| #include <cassert> | |
| #include <chrono> | |
| #include <deque> | |
| #include <iostream> | |
| #include <limits> | |
| #include <map> | |
| #include <numeric> |
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> | |
| #include <string> | |
| #include <vector> | |
| #include <numeric> | |
| namespace { | |
| namespace helper { | |
| using std::to_string; |
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> | |
| #include <vector> | |
| #include <numeric> | |
| #include <iterator> | |
| #include <boost/type_index.hpp> | |
| using namespace boost::typeindex; | |
| template <std::size_t N, std::size_t M, 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 <algorithm> | |
| #include <iostream> | |
| #include <vector> | |
| enum { p1, p2 }; | |
| int main() { | |
| std::cout.sync_with_stdio(false); | |
| typedef unsigned short Board; |
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 "stdio.h" | |
| #include "stdlib.h" | |
| #include "stdbool.h" | |
| typedef struct Node Node; | |
| struct Node { | |
| int key; | |
| char* val; | |
| 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 "stdio.h" | |
| #include "string.h" | |
| #define m 97 | |
| int n = 0; | |
| char* keys[m] = { 0 }; | |
| long values[m] = { 0 }; | |
| /* hash function for strings |
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 <list> | |
| #include <numeric> | |
| #include <deque> | |
| using namespace std; | |
| auto head = [](auto v) { return decltype(v){ v.front() }; }; | |
| auto tail = [](auto v) { return decltype(v){ next(begin(v)), end(v) }; }; | |
| auto print = [](auto const& v) { for (auto const& i : v) cout << boolalpha << i << ' '; cout << '\n'; }; |
NewerOlder