25namespace bio::meta::detail
32template <
typename tuple_t>
33concept tuple_size =
requires(tuple_t v) {
35 std::tuple_size<tuple_t>::value
36 } -> std::convertible_to<size_t>;
43template <
typename tuple_t>
44concept tuple_get =
requires(tuple_t & v, tuple_t
const & v_c) {
45 requires std::tuple_size_v<tuple_t> > 0;
47 typename std::tuple_element<0, tuple_t>::type;
51 } -> std::convertible_to<typename std::tuple_element<0, tuple_t>::type>;
58 } -> std::convertible_to<typename std::tuple_element<0, tuple_t>::type>;
61 } -> std::convertible_to<typename std::tuple_element<0, tuple_t>::type>;
63 get<0>(std::move(v_c))
64 } -> std::convertible_to<typename std::tuple_element<0, tuple_t>::type
const &&>;
74template <detail::tuple_size tuple_t>
79 template <
size_t... Is>
82 return type_list<std::tuple_element_t<Is, tuple_t>...>{};
95template <detail::tuple_size tuple_t>
96using tuple_type_list_t =
typename tuple_type_list<tuple_t>::type;
101template <
typename... elements_t>
102inline constexpr auto all_elements_model_totally_ordered(meta::type_list<elements_t...>)
109template <
typename tuple_t>
112 detail::all_elements_model_totally_ordered(tuple_type_list_t<tuple_t>{})
115static constexpr bool all_elements_model_totally_ordered_v =
116 decltype(detail::all_elements_model_totally_ordered(tuple_type_list_t<tuple_t>{}))::value;
175concept tuple_like = detail::tuple_size<std::remove_reference_t<t>> &&
requires(t v) {
176 typename detail::tuple_type_list<std::remove_cvref_t<t>>::type;
182 requires(std::tuple_size<std::remove_reference_t<t>>::value == 0) ||
199concept pair_like = tuple_like<t> && std::tuple_size_v<std::remove_reference_t<t>> == 2;
Provides various type traits on generic types.
Provides bio::meta::pod_tuple.
Provides various traits to inspect templates.
Provides bio::meta::type_list.