Skip to content

Instantly share code, notes, and snippets.

View detri's full-sized avatar

Aaron Dosser detri

View GitHub Profile
@detri
detri / free_function.hpp
Created June 12, 2026 15:41
Free function to functor adapter
// SPDX-License-Identifier: 0BSD
#pragma once
#include <type_traits>
#include <utility>
namespace detri
{
template<class T>
concept is_free_fn_ptr = std::is_pointer_v<T> && std::is_function_v<std::remove_pointer_t<T>>;
@detri
detri / intrusive_ptr.hpp
Last active April 20, 2026 20:13
Intrusive pointer (WIP, broadly untested, constructive criticism welcome)
#pragma once
#ifndef DOLLY_RTTI_ENABLED
#if defined(__cpp_rtti)
#define DOLLY_RTTI_ENABLED 1
#else
#define DOLLY_RTTI_ENABLED 0
#endif
#endif
@detri
detri / executor.hpp
Last active September 13, 2025 13:35
Entitask Executor (EnTT & Taskflow)
#pragma once
#include "entt/entt.hpp"
#include "taskflow/taskflow.hpp"
namespace entitask
{
/**
* Basic executor class template.
* Sets up an EnTT organizer's graph to be used as a tf::Taskflow