Loading...
Searching...
No Matches
sideFunc.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "indep/macro/overload.hpp"
5
6#define BY_SIDE_FUNC_1(name) BY_SIDE_FUNC_2(it, name)
7#define BY_SIDE_FUNC_2(paramPtr, name) BY_SIDE_FUNC_3(it, name(*it), decltype(name(*it))())
8#define BY_SIDE_FUNC_3(paramPtr, expr, ret) \
9 { return paramPtr ? expr : ret; }
10
24#define BY_SIDE_FUNC(...) BY_OVERLOAD(BY_SIDE_FUNC, __VA_ARGS__)