Commit 3087a7a6 authored by Paul's avatar Paul
Browse files

Format

parent 694cb20a
...@@ -64,9 +64,7 @@ template <class T> ...@@ -64,9 +64,7 @@ template <class T>
auto to_value_impl(rank<1>, const T& x) -> decltype(std::tuple_size<T>{}, value{}) auto to_value_impl(rank<1>, const T& x) -> decltype(std::tuple_size<T>{}, value{})
{ {
value result = value::array{}; value result = value::array{};
repeat_c<std::tuple_size<T>{}>([&](auto i) { repeat_c<std::tuple_size<T>{}>([&](auto i) { result.push_back(to_value(std::get<i>(x))); });
result.push_back(to_value(std::get<i>(x)));
});
return result; return result;
} }
...@@ -147,12 +145,10 @@ void from_value_impl(rank<0>, const value& v, T& x) ...@@ -147,12 +145,10 @@ void from_value_impl(rank<0>, const value& v, T& x)
} }
template <class T> template <class T>
auto from_value_impl(rank<1>, const value& v, T& x) auto from_value_impl(rank<1>, const value& v, T& x) -> decltype(std::tuple_size<T>{}, void())
-> decltype(std::tuple_size<T>{}, void())
{ {
repeat_c<std::tuple_size<T>{}>([&](auto i) { repeat_c<std::tuple_size<T>{}>(
std::get<i>(x) = from_value<std::tuple_element_t<i, T>>(v[i]); [&](auto i) { std::get<i>(x) = from_value<std::tuple_element_t<i, T>>(v[i]); });
});
} }
template <class T> template <class T>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment