0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 21:04:15 +08:00

move is_invocable to type_traits.h

This commit is contained in:
Frank Park 2017-04-11 01:09:31 -04:00
parent ac5e93b856
commit 7866749a2a

View File

@ -533,6 +533,16 @@ namespace sqlpp
template <typename Db> template <typename Db>
using serializer_context_of = typename serializer_context_of_impl<Db>::type; using serializer_context_of = typename serializer_context_of_impl<Db>::type;
template<typename F, typename... Args>
struct in_invocable
{
template<class U> static auto test(U* p) -> decltype((*p)(std::declval<Args>()...), void(), std::true_type());
template<class U> static auto test(...) -> decltype(std::false_type());
typedef decltype(test<F>(0)) type;
static constexpr bool value = decltype(test<F>(0))::value;
};
} }
#endif #endif