diff --git a/src/include/ZividPython/Releasable.h b/src/include/ZividPython/Releasable.h index a4da9cec..983522fc 100644 --- a/src/include/ZividPython/Releasable.h +++ b/src/include/ZividPython/Releasable.h @@ -1,5 +1,8 @@ #pragma once +#include + +#include #include #include #include @@ -129,7 +132,8 @@ namespace ZividPython class Singleton { public: - template + template, Args...>::value, void *>::type = nullptr> Singleton(Args &&...args) { // Keep the singleton alive forever to avoid races with diff --git a/src/include/ZividPython/Traits.h b/src/include/ZividPython/Traits.h index ac6d7a57..b5a6b442 100644 --- a/src/include/ZividPython/Traits.h +++ b/src/include/ZividPython/Traits.h @@ -1,6 +1,7 @@ #pragma once #include +#include #if __has_include() # include @@ -42,4 +43,17 @@ namespace ZividPython template class Op, class... Args> using is_detected = typename Detail::detector::value_t; #endif + + + template + struct has_type; + + template + struct has_type> : std::disjunction...> + {}; + + template + struct has_type : has_type> + {}; + } // namespace ZividPython \ No newline at end of file