diff --git a/CMakeLists.txt b/CMakeLists.txt index cd8a335..f35ace0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.20) include(cmake/color.cmake) -set(BLT_VERSION 0.18.27) +set(BLT_VERSION 0.18.28) set(BLT_TEST_VERSION 0.0.1) set(BLT_TARGET BLT) diff --git a/include/blt/std/meta.h b/include/blt/std/meta.h index b21408c..f6a54b4 100644 --- a/include/blt/std/meta.h +++ b/include/blt/std/meta.h @@ -65,7 +65,7 @@ namespace blt::meta lambda_helper(Lambda) -> lambda_helper; // https://stackoverflow.com/questions/66397071/is-it-possible-to-check-if-overloaded-operator-for-type-or-class-exists - template + template class is_streamable { private: @@ -87,6 +87,16 @@ namespace blt::meta template inline constexpr bool is_streamable_v = is_streamable::value; + +#define BLT_META_MAKE_FUNCTION_CHECK(FUNC, ...)\ + template \ + class has_func_##FUNC : public std::false_type \ + {}; \ + template \ + class has_func_##FUNC().drop(,##__VA_ARGS__))>> : public std::true_type \ + {}; \ + template \ + inline constexpr bool has_func_##FUNC##_v = has_func_##FUNC::value; \ }