5 # ifndef VCCC_TYPE_SUPPORT_AT_HPP
6 # define VCCC_TYPE_SUPPORT_AT_HPP
45 template<std::
size_t I,
typename T, std::enable_if_t<is_tuple_like<std::decay_t<T>>::value,
int> = 0>
46 constexpr decltype(
auto)
at(T&& t) noexcept {
47 return std::get<I>(std::forward<T>(t));
53 template<std::
size_t i,
typename C,
typename T>
54 constexpr decltype(
auto)
at(T&& t) {
55 return cast<C>(at<i>(std::forward<T>(t)));
62 template<std::
size_t i, std::
size_t j,
typename C,
typename T>
63 constexpr decltype(
auto)
at(T&& t) {
64 return cast<C>(at<i, j>(std::forward<T>(t)));
73 template<
typename ...Ts>
76 template<
typename ...Args>
77 constexpr bind_obj(Args&&... args) : tup(
std::forward<Args>(args)...) {}
80 constexpr bind_obj& operator = (T&& type)
82 bind_impl(std::forward<T>(type), std::index_sequence_for<Ts...>{});
87 template<
typename T, std::size_t ...I>
88 constexpr
void bind_impl(T&& type, std::index_sequence<I...>)
90 int dummy[
sizeof...(I)] = {
91 (at<I>(tup) = at<I>(std::forward<T>(type)), 0)...
96 std::tuple<Ts...> tup;
115 template<
typename ...Args>
116 constexpr
inline internal::bind_obj<Args...>
bind_at(Args&&... args) {
117 return internal::bind_obj<Args...>(std::forward<Args>(args)...);
constexpr decltype(auto) at(T &&t) noexcept
Return i-th element of tuple-like object.
Definition: at.hpp:46
constexpr internal::bind_obj< Args... > bind_at(Args &&... args)
call at<...>(...) to args...
Definition: at.hpp:116
Definition: matrix.hpp:495
Definition: directory.h:12