Skip to content

Instantly share code, notes, and snippets.

View robertshepherdcpp's full-sized avatar
💻
Programming in C++

Robert Shepherd robertshepherdcpp

💻
Programming in C++
View GitHub Profile
#include<iostream>
template<auto A, auto B, auto first_, auto second_, typename to_compare>
struct inline_if
{
constexpr auto operator()()
{
if constexpr(to_compare{}.template operation<A, B>())
{
return first_;