Graphle 1.0.0
A C++20 header-only graph library
Loading...
Searching...
No Matches
if_constexpr.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <common.hpp>
4
5
6namespace graphle::meta {
14 template <bool Condition, typename T, typename F>
15 constexpr inline decltype(auto) if_constexpr(T&& if_true, F&& if_false) {
16 if constexpr (Condition) return GRAPHLE_FWD(if_true);
17 else return GRAPHLE_FWD(if_false);
18 }
19}
#define GRAPHLE_FWD(...)
Definition: common.hpp:14
constexpr decltype(auto) if_constexpr(T &&if_true, F &&if_false)