Skip to content

Instantly share code, notes, and snippets.

View dabulla's full-sized avatar

Daniel Bulla dabulla

  • Widnau, St Gallen
View GitHub Profile
@dabulla
dabulla / compiletime_sort.cpp
Last active August 13, 2019 05:00
generic sortfunctions for multiple member at compile time using variadic templates and partial specialisation (no vs2017 support)
#include <ctime>
#include <cstring>
#include <chrono>
#include <sstream>
#include <iomanip>
#include <iostream>
template <typename member_t, typename object_t, member_t object_t::*member>
static int compare(const object_t & obj1, const object_t & obj2)
{