24#ifndef MYSQL_SERIALIZATION_SERIALIZABLE_TYPE_TRAITS_H
25#define MYSQL_SERIALIZATION_SERIALIZABLE_TYPE_TRAITS_H
31#include <unordered_map>
32#include <unordered_set>
51 return std::is_enum<std::decay_t<T>>::value;
59 return std::is_base_of<Serializable<std::decay_t<T>>, std::decay_t<T>>::value;
83template <
class T, std::
size_t N>
92 std::is_array<std::remove_const_t<T>>::value;
109 return (is_vector_list_type<T>() ==
false && is_map_type<T>() ==
false &&
110 is_set_type<T>() ==
false && is_serializable_type<T>() ==
false &&
111 is_enum_type<T>() ==
false && is_array_type_v<T>() ==
false);
119 return (is_vector_list_type<T>() ==
false && is_map_type<T>() ==
false &&
120 is_set_type<T>() ==
false && is_serializable_type<T>() ==
false &&
121 is_enum_type<T>() ==
false);
129 return std::is_same<std::decay_t<T>, std::string>::value;
137 return std::is_integral<std::decay_t<T>>::value;
static constexpr bool is_integral_type()
This function checks whether given type is integer type.
Definition: serializable_type_traits.h:136
static constexpr bool is_vector_list_type()
This function checks whether given type is STL list or vector.
Definition: serializable_type_traits.h:66
static constexpr bool is_map_type()
This function checks whether given type is STL map or unordered map.
Definition: serializable_type_traits.h:75
static constexpr bool is_set_type()
This function checks whether given type is STL set or unordered set.
Definition: serializable_type_traits.h:99
static constexpr bool is_string_type()
This function checks whether given type is std::string.
Definition: serializable_type_traits.h:128
static constexpr bool is_array_type_v()
This function checks whether given type is STL array.
Definition: serializable_type_traits.h:90
static constexpr bool is_simple_type()
This function checks whether given type is simple serializable type.
Definition: serializable_type_traits.h:108
static constexpr bool is_serializable_type()
This function checks whether given type is serializable.
Definition: serializable_type_traits.h:58
static constexpr bool is_bounded_size_type()
This function checks whether given type (set) is bounded.
Definition: serializable_type_traits.h:118
static constexpr bool is_enum_type()
This function checks whether given type is enum type.
Definition: serializable_type_traits.h:50
Definition: gcs_xcom_synode.h:64
std::unordered_map< Key, Value, Hash, Key_equal, ut::allocator< std::pair< const Key, Value > > > unordered_map
Definition: ut0new.h:2900
std::unordered_set< Key, std::hash< Key >, std::equal_to< Key >, ut::allocator< Key > > unordered_set
Definition: ut0new.h:2889
std::vector< T, ut::allocator< T > > vector
Specialization of vector which uses allocator.
Definition: ut0new.h:2876
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2884
std::map< Key, Value, Compare, ut::allocator< std::pair< const Key, Value > > > map
Specialization of map which uses ut_allocator.
Definition: ut0new.h:2894
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2880
Definition: serializable_type_traits.h:81
Helper struct used to determine at compile time whether a given type T is a template specialization o...
Definition: is_specialization.h:40