Skip to content

Instantly share code, notes, and snippets.

View archibald1418's full-sized avatar
😈

Oleg Valiulin archibald1418

😈
View GitHub Profile
@archibald1418
archibald1418 / fizzbuzz.cpp
Created July 14, 2022 00:31
Fizzbuzz on templates without <type_traits>
#include <iostream>
// Truthiness
struct true_type{static const bool value = true;};
struct false_type{ static const bool value = false;};
// Pick type based on bool value
template <bool B, typename T, typename U>
struct conditional{