11 namespace mdds {
namespace mtv {
namespace detail {
16 using yes_type = char;
19 template<
typename U,
typename T::
size_type (U::*)() const>
27 static no_type test(...);
29 using type = std::conditional_t<sizeof(test<T>(0)) ==
sizeof(yes_type), std::true_type, std::false_type>;
33 std::size_t get_block_capacity(
const T& blk, std::true_type)
35 return blk.capacity();
39 std::size_t get_block_capacity(
const T&, std::false_type)
45 std::size_t get_block_capacity(
const T& blk)
47 typename has_capacity_method<T>::type v;
48 return get_block_capacity(blk, v);
54 using yes_type = char;
57 template<
typename U,
void (U::*)(
typename T::
size_type)>
65 static no_type test(...);
67 using type = std::conditional_t<sizeof(test<T>(0)) ==
sizeof(yes_type), std::true_type, std::false_type>;
71 void reserve(T& blk,
typename T::size_type size, std::true_type)
73 return blk.reserve(size);
77 void reserve(T&,
typename T::size_type, std::false_type)
81 void reserve(T& blk,
typename T::size_type size)
83 typename has_reserve_method<T>::type v;
84 reserve(blk, size, v);
90 using yes_type = char;
93 template<
typename U,
void (U::*)()>
101 static no_type test(...);
103 using type = std::conditional_t<sizeof(test<T>(0)) ==
sizeof(yes_type), std::true_type, std::false_type>;
107 void shrink_to_fit(T& blk, std::true_type)
109 return blk.shrink_to_fit();
113 void shrink_to_fit(T&, std::false_type)
117 void shrink_to_fit(T& blk)
119 typename has_shrink_to_fit_method<T>::type v;
120 shrink_to_fit(blk, v);
126 using type = std::false_type;
132 using type = std::true_type;
135 template<
typename Blk>
138 using type =
typename is_std_vector_bool_store<typename Blk::store_type>::type;
141 template<
typename T,
typename =
void>
Definition: types_util.hpp:52
Definition: types_util.hpp:124
Definition: types_util.hpp:14
Definition: types_util.hpp:136
Definition: types_util.hpp:142
Definition: cref_wrapper.hpp:12
Definition: types_util.hpp:88
Definition: types_util.hpp:58
Definition: types_util.hpp:20
Definition: types_util.hpp:94