Skip to content

Instantly share code, notes, and snippets.

View i-saint's full-sized avatar

Seiya Ishibashi i-saint

View GitHub Profile
@i-saint
i-saint / func_traits.cpp
Created February 19, 2025 13:58
func_traits
template <typename>
struct func_traits;
// function
template <typename R, typename... Args>
struct func_traits<R (*)(Args...)>
{
using return_type = R;
using args_type = std::tuple<Args...>;
template <int I>
#include <iostream>
#include <string>
#include <set>
#include <chrono>
#include <random>
#include <algorithm>
// dst: std::set, std::map, etc
// begin & end: iterator of sorted items
template<class Tree, class Iterator>
#include <cstdio>
// https://www.johndcook.com/blog/2019/11/12/rump-floating-point/
template <typename T>
T f(T x, T y) {
T x2 = x*x;
T y2 = y*y;
T y4 = y2*y2;
T y6 = y2*y4;
T y8 = y2*y6;
#include <cstdio>
#include <cstring>
#include <utility>
template<class T, size_t N>
static inline T select_value(
std::pair<const char*, T> (&&table)[N], const char* name, T fallback)
{
for (auto& kvp : table) {
if (std::strcmp(kvp.first, name) == 0) {
#include <iostream>
#include <type_traits>
#include <utility>
#include <tuple>
#include <array>
#include <vector>
#include <list>
template<class Iter>
struct range_holder

About Me

me
Name: Seiya Ishibashi
Nationality: Japan
Address: Tokyo Japan
Email: saint.skr@gmail.com

Work Experience

2021-2025 Polyphony Digital