13 #ifndef RANGES_V3_FUNCTIONAL_COMPOSE_HPP
14 #define RANGES_V3_FUNCTIONAL_COMPOSE_HPP
16 #include <type_traits>
21 #include <range/v3/detail/config.hpp>
23 #include <range/v3/utility/static_const.hpp>
25 #include <range/v3/detail/prologue.hpp>
31 template<
typename Second,
typename First>
35 RANGES_NO_UNIQUE_ADDRESS
37 RANGES_NO_UNIQUE_ADDRESS
41 template<
typename A,
typename B,
typename... Ts>
43 CPP_auto_fun(do_)(A &&a, B &&b, std::false_type, Ts &&... ts)
45 return invoke((B &&) b, invoke((A &&) a, (Ts &&) ts...))
47 template<typename A, typename B, typename... Ts>
48 static constexpr
auto CPP_auto_fun(do_)(A &&a, B &&b, std::true_type, Ts &&... ts)
50 return (invoke((A &&) a, (Ts &&) ts...), invoke((B &&) b))
56 : first_(std::move(
first))
57 , second_(std::move(
second))
60 template<
typename... Ts>
61 constexpr
auto CPP_auto_fun(
operator())(Ts &&... ts)(
mutable &)
63 return composed::do_(first_,
65 std::is_void<invoke_result_t<First &, Ts...>>{},
68 template<typename... Ts>
69 constexpr
auto CPP_auto_fun(
operator())(Ts &&... ts)(
const &)
71 return composed::do_((First
const &)first_,
72 (Second
const &)second_,
73 std::is_void<invoke_result_t<First const &, Ts...>>{},
76 template<typename... Ts>
77 constexpr
auto CPP_auto_fun(
operator())(Ts &&... ts)(
mutable &&)
79 return composed::do_((First &&)first_,
81 std::is_void<invoke_result_t<First &&, Ts...>>{},
89 template<
typename Second,
typename First>
102 #include <range/v3/detail/epilogue.hpp>
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector >>, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition: conversion.hpp:399
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251
front< pop_front< Pair > > second
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2256
Definition: compose.hpp:88
Definition: compose.hpp:33