diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f53061..9b32288 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.16) +set(BLT_VERSION 0.18.17) 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 cf2904e..828819c 100644 --- a/include/blt/std/meta.h +++ b/include/blt/std/meta.h @@ -21,6 +21,8 @@ #include #include +#include +#include namespace blt::meta { @@ -56,6 +58,29 @@ namespace blt::meta template lambda_helper(Lambda) -> lambda_helper; + // https://stackoverflow.com/questions/66397071/is-it-possible-to-check-if-overloaded-operator-for-type-or-class-exists + template + class is_streamable + { + private: + template + static auto test(int) -> decltype(std::declval() << std::declval(), std::true_type()) + { + return std::declval(); + } + + template + static auto test(...) -> std::false_type + { + return std::declval(); + } + + public: + static constexpr bool value = decltype(test(0))::value; + }; + + template + inline constexpr bool is_streamable_v = is_streamable::value; } diff --git a/libraries/parallel-hashmap b/libraries/parallel-hashmap index 8a889d3..d88c5e1 160000 --- a/libraries/parallel-hashmap +++ b/libraries/parallel-hashmap @@ -1 +1 @@ -Subproject commit 8a889d3699b3c09ade435641fb034427f3fd12b6 +Subproject commit d88c5e15079047777b418132ece5879e7c9aaa2b