diff --git a/include/Common/cpp_utils.h b/include/Common/cpp_utils.h index 5c4aa22..76739ac 100644 --- a/include/Common/cpp_utils.h +++ b/include/Common/cpp_utils.h @@ -17,5 +17,13 @@ struct _has_##method\ static inline constexpr bool has_##method = _has_##method::value; +//taken from here https://www.fluentcpp.com/2017/10/27/function-aliases-cpp/ +#define ALIAS_TEMPLATE_FUNCTION(highLevelF, lowLevelF) \ + template \ + inline auto highLevelF(Args &&... args)->decltype(lowLevelF(std::forward(args)...)) \ + { \ + return lowLevelF(std::forward(args)...); \ + } + #endif // CPP_UTILS_H