Skip to content

Instantly share code, notes, and snippets.

View Hamondorf's full-sized avatar

William Stevens Hamondorf

View GitHub Profile
@Hamondorf
Hamondorf / tuplify.hpp
Last active October 19, 2020 08:33
Tuplify, like std::tie but cooler (I hope). Structured bindings to specific members using their names or their getters.
#ifndef HAM_TUPLIFY_HPP
#define HAM_TUPLIFY_HPP
#include <tuple>
#include <type_traits>
#include <utility>
// There's examples and stuff towards the bottom
namespace ham
@Hamondorf
Hamondorf / bitmask.hpp
Last active September 17, 2020 17:46
Enable operator overloads for bitmask types with ADL
#ifndef HAM_BITMASK_HPP_
#define HAM_BITMASK_HPP_
#include <type_traits>
// Namespace: ham_cpp ______________________________________________________
// ========================================================================= //
namespace ham_cpp
{
@Hamondorf
Hamondorf / conditonal.hpp
Last active May 25, 2020 09:34
std::conditional extension thing
#pragma once
#include <type_traits>
namespace Tools
{
namespace Conditions
{
template<class...>