9#ifndef HEADER_SQLITEPP_META_INCLUDED
10#define HEADER_SQLITEPP_META_INCLUDED
16#if __cpp_impl_three_way_comparison >= 201907
19#if __cpp_lib_bit_cast >= 201806L
23#define SQLITEPP_CALL_DETECTOR_0(name, rettype, call) \
25 template<class T> static constexpr bool has_##name##_impl(decltype(call()) *) \
26 { return std::is_same_v<decltype(call()), rettype>; } \
27 template<class T> static constexpr bool has_##name##_impl(...) \
30 template<class T> static constexpr bool has_##name = has_##name##_impl<T>(nullptr); \
31 template<class T> static constexpr bool has_noexcept_##name = []() constexpr { \
32 if constexpr (has_##name<T>) \
33 return noexcept(call()); \
38#define SQLITEPP_CALL_DETECTOR(name, rettype, call, ...) \
40 template<class T> static constexpr bool has_##name##_impl(decltype(call(__VA_ARGS__)) *) \
41 { return std::is_same_v<decltype(call(__VA_ARGS__)), rettype>; } \
42 template<class T> static constexpr bool has_##name##_impl(...) \
45 template<class T> static constexpr bool has_##name = has_##name##_impl<T>(nullptr); \
46 template<class T> static constexpr bool has_noexcept_##name = []() constexpr { \
47 if constexpr (has_##name<T>) \
48 return noexcept(call(__VA_ARGS__)); \
53#define SQLITEPP_STATIC_METHOD_DETECTOR_0(rettype, name) SQLITEPP_CALL_DETECTOR_0(name, rettype, T::name)
54#define SQLITEPP_STATIC_METHOD_DETECTOR(rettype, name, ...) SQLITEPP_CALL_DETECTOR(name, rettype, T::name, __VA_ARGS__)
55#define SQLITEPP_METHOD_DETECTOR_0(rettype, name) SQLITEPP_CALL_DETECTOR_0(name, rettype, std::declval<T>().name)
56#define SQLITEPP_METHOD_DETECTOR(rettype, name, ...) SQLITEPP_CALL_DETECTOR(name, rettype, std::declval<T>().name, __VA_ARGS__)
62#if __cplusplus <= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG <= 201703L)
64 template<
class T >
struct type_identity {
using type = T; };
66 template<
class T >
using type_identity_t =
typename type_identity<T>::type;
78 template<
class T,
bool B>
79 constexpr bool dependent_bool = B;
82 constexpr bool dependent_false = dependent_bool<T, false>;
85 constexpr bool dependent_true = dependent_bool<T, true>;
91 using size_equivalent =
100 #if __cpp_impl_three_way_comparison >= 201907
105 using equivalent = size_equivalent<std::strong_ordering>;
109 #if __cpp_lib_bit_cast >= 201806L
117 return val < 0 ? std::strong_ordering::less : (
118 val == 0 ? std::strong_ordering::equal : (
119 std::strong_ordering::greater
ThinSQLite++ namespace.
Definition backup_iface.hpp:17