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 <ranges> | |
| #include <span> | |
| #include <algorithm> | |
| #include <cstdint> | |
| #include <cstring> | |
| #include <limits> | |
| #include <vector> | |
| #include <array> |
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
| /** | |
| * Universal C++23 Printer | |
| * * A complete tutorial implementation of std::formatter for: | |
| * - Primitives | |
| * - Enums | |
| * - Standard Containers (vector, map, set, etc.) | |
| * - Container Adapters (stack, queue) | |
| * - Tuples and Pairs | |
| * - Custom Structs (via automatic reflection emulation) | |
| * * Compile with: g++ -std=c++23 main.cpp -o universal_printer |
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 <ranges> | |
| #include <print> | |
| #include <cctype> | |
| #include <string> | |
| #include <string_view> | |
| using namespace std::literals; | |
| using namespace std::string_view_literals; |
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_view> | |
| #include <iostream> | |
| #include <bit> | |
| #include <bitset> | |
| #include "murmur3.hpp" | |
| // Will Create 2 overloaded operator "" | |
| // With | |
| _MURMURHASH3_128(42) |
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
| #pragma once | |
| #ifndef FNV1a_HPP | |
| #define FNV1a_HPP | |
| // From https://gist.github.com/neudinger/4921e8cf323b2be544982e8b5968cd57 | |
| #include <unistd.h> | |
| #include <string_view> | |
| #include <cstdint> // uint8_t, uint16_t, uint64_t |