title: Why can't I reverse a split-range using range-v3?
body: <p>I want to split, reverse, and then join a string using range-v3. However, code below won't compile.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;range/v3/all.hpp&gt;
  #include &lt;iostream&gt;
  
  using namespace ranges;
  
  int main(int argc, char *argv[])
  {
      auto str = std::string("abc.def.ghi");
      auto sv = str
                | view::split('.')
                | view::reverse
                | view::join('.');
      std::cout&lt;&lt;sv;
      return 0;
  }
  </code></pre>
  
  <p>Compiler output:</p>
  
  <pre><code>error: invalid operands to binary expression ('decltype(pipeable_access::impl&lt;view&lt;reverse_fn&gt; &gt;::pipe(static_cast&lt;ranges::v3::split_view&lt;ranges::v3::iterator_range&lt;std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;, std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt; &gt;, ranges::v3::view::split_fn::element_pred&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &amp;&gt; &gt; &amp;&amp;&gt;(arg), pipe))' (aka 'void') and 'decltype(make_view(view_access::impl&lt;join_fn&gt;::bind(this-&gt;view_, static_cast&lt;char &amp;&amp;&gt;(ts))))' (aka 'view&lt;ranges::v3::detail::pipeable_binder&lt;std::_Binder&lt;std::_Unforced, ranges::v3::view::join_fn &amp;, const std::_Ph&lt;1&gt; &amp;, char&gt; &gt; &gt;'))
  range\v3\view\any_view.hpp:60: candidate function not viable: cannot convert argument of incomplete type 'decltype(pipeable_access::impl&lt;view&lt;reverse_fn&gt; &gt;::pipe(static_cast&lt;ranges::v3::split_view&lt;ranges::v3::iterator_range&lt;std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;, std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt; &gt;, ranges::v3::view::split_fn::element_pred&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &amp;&gt; &gt; &amp;&amp;&gt;(arg), pipe))' (aka 'void') to 'ranges::v3::category' for 1st argument
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\include\regex:1219: candidate function not viable: cannot convert argument of incomplete type 'decltype(pipeable_access::impl&lt;view&lt;reverse_fn&gt; &gt;::pipe(static_cast&lt;ranges::v3::split_view&lt;ranges::v3::iterator_range&lt;std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt;, std::_String_iterator&lt;std::_String_val&lt;std::_Simple_types&lt;char&gt; &gt; &gt; &gt;, ranges::v3::view::split_fn::element_pred&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &amp;&gt; &gt; &amp;&amp;&gt;(arg), pipe))' (aka 'void') to 'std::_Node_flags' for 1st argument
  range\v3\utility\functional.hpp:725: candidate template ignored: substitution failure [with Arg = void, Pipe = ranges::v3::view::view&lt;ranges::v3::detail::pipeable_binder&lt;std::_Binder&lt;std::_Unforced, ranges::v3::view::join_fn &amp;, const std::_Ph&lt;1&gt; &amp;, char&gt; &gt; &gt;, _concept_requires_724 = false, $3 = nullptr]: cannot form a reference to 'void'
  range\v3\utility\functional.hpp:734: candidate template ignored: requirement 'false || (is_pipeable&lt;void&gt;() &amp;&amp; is_pipeable&lt;ranges::v3::view::view&lt;ranges::v3::detail::pipeable_binder&lt;std::_Binder&lt;std::_Unforced, ranges::v3::view::join_fn &amp;, const std::_Ph&lt;1&gt; &amp;, char&gt; &gt; &gt; &gt;())' was not satisfied [with Pipe0 = void, Pipe1 = ranges::v3::view::view&lt;ranges::v3::detail::pipeable_binder&lt;std::_Binder&lt;std::_Unforced, ranges::v3::view::join_fn &amp;, const std::_Ph&lt;1&gt; &amp;, char&gt; &gt; &gt;, _concept_requires_733 = false]
  </code></pre>
  
  <p>Found a way of doing this:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>    auto temp_container = str
                | view::split('.')
                | ::ranges::to_vector
                | action::reverse
                ;
      std::string output = temp_container 
                | view::all
                | view::join('.')
                ;
  </code></pre>
  
  <p>Any better ideas?</p>