Port invoke_fused -> unpack

This commit is contained in:
Denis Blank 2018-02-06 02:18:28 +01:00
parent f0b25956b9
commit 8ef86d3b70

View File

@ -191,10 +191,10 @@ struct flat_arraylizer {
template <typename C, typename... T> template <typename C, typename... T>
constexpr auto apply_spread_impl(std::true_type, C&& callable, T&&... args) constexpr auto apply_spread_impl(std::true_type, C&& callable, T&&... args)
-> decltype( -> decltype(
invoke_fused(std::forward<C>(callable), traits::unpack(std::tuple_cat(undecorate(std::forward<T>(args))...)),
std::tuple_cat(undecorate(std::forward<T>(args))...))) { std::forward<C>(callable)) {
return invoke_fused(std::forward<C>(callable), return traits::unpack(std::tuple_cat(undecorate(std::forward<T>(args))...),
std::tuple_cat(undecorate(std::forward<T>(args))...)); std::forward<C>(callable));
} }
/// Use the linear instantiation for variadic packs which don't /// Use the linear instantiation for variadic packs which don't
@ -601,15 +601,15 @@ struct tuple_like_remapper<
/// to a container of the same type which may contain /// to a container of the same type which may contain
/// different types. /// different types.
template <typename Strategy, typename T, typename M> template <typename Strategy, typename T, typename M>
auto remap(Strategy, T&& container, M&& mapper) -> decltype(invoke_fused( auto remap(Strategy, T&& container, M&& mapper) -> decltype(traits::unpack(
std::forward<T>(container),
std::declval<tuple_like_remapper<Strategy, typename std::decay<M>::type, std::declval<tuple_like_remapper<Strategy, typename std::decay<M>::type,
typename std::decay<T>::type>>(), typename std::decay<T>::type>>())) {
std::forward<T>(container))) { return traits::unpack(
return invoke_fused( std::forward<T>(container),
tuple_like_remapper<Strategy, typename std::decay<M>::type, tuple_like_remapper<Strategy, typename std::decay<M>::type,
typename std::decay<T>::type>{ typename std::decay<T>::type>{
std::forward<M>(mapper)}, std::forward<M>(mapper)});
std::forward<T>(container));
} }
} // end namespace tuple_like_remapping } // end namespace tuple_like_remapping