title: Is it possible to alias boost::make_iterator_range?
body: <p>I am having trouble aliasing the function <code>boost::make_iterator_range</code></p>
  
  <p>(I would like to hide boost behind an alias in case this particular library gets adopted into the standard sometime in the future.)</p>
  
  <p>Is there any way this can be made to work?</p>
  
  <pre><code>#include &lt;boost/range/iterator_range.hpp&gt;
  
  void Foo()
  {
  }
  
  template&lt; typename T &gt;
  void Bar()
  { }
  
  template&lt; typename T &gt;
  void Bar(char c)
  { }
  
  void (&amp;FooAlias)() = Foo;           // ok
  void (&amp;BarAlias)() = Bar&lt;int&gt;;      // ok
  
  // boost::iterator_range&lt;const size_t*&gt; (&amp;MakeIterRangeAlias)(const size_t*,const size_t*) = 
  //  boost::make_iterator_range&lt;const size_t*&gt;;  // not ok
  
  int main(int argc, char** argv)
  {
      const size_t v[] = { 3, 5, 1, 5, 29, 15 };
  
      boost::iterator_range&lt;const size_t*&gt; r 
          = boost::make_iterator_range( std::begin( v ), std::end( v )); // want to alias this
  
      return 0;
  }
  </code></pre>
  
  <p>The error message is:</p>
  
  <pre><code>In file included from /usr/include/boost/iterator/iterator_categories.hpp:15:0,
                   from /usr/include/boost/iterator/detail/facade_iterator_category.hpp:7,
                   from /usr/include/boost/iterator/iterator_facade.hpp:14,
                   from /usr/include/boost/range/iterator_range_core.hpp:23,
                   from /usr/include/boost/range/iterator_range.hpp:13,
                   from sandbox.cpp:2:
  /usr/include/boost/mpl/eval_if.hpp: In instantiation of ‘boost::mpl::eval_if_c&lt;true, boost::range_const_iterator&lt;const long unsigned int*&gt;, boost::range_mutable_iterator&lt;const long unsigned int* const&gt; &gt;’:
  /usr/include/boost/range/iterator.hpp:63:63:   instantiated from ‘boost::range_iterator&lt;const long unsigned int* const&gt;’
  sandbox.cpp:20:10:   instantiated from here
  /usr/include/boost/mpl/eval_if.hpp:60:31: error: no type named ‘type’ in ‘boost::mpl::eval_if_c&lt;true, boost::range_const_iterator&lt;const long unsigned int*&gt;, boost::range_mutable_iterator&lt;const long unsigned int* const&gt; &gt;::f_ {aka struct boost::range_const_iterator&lt;const long unsigned int*&gt;}’
  /usr/include/boost/mpl/eval_if.hpp: In instantiation of ‘boost::mpl::eval_if_c&lt;false, boost::range_const_iterator&lt;const long unsigned int*&gt;, boost::range_mutable_iterator&lt;const long unsigned int*&gt; &gt;’:
  /usr/include/boost/range/iterator.hpp:63:63:   instantiated from ‘boost::range_iterator&lt;const long unsigned int*&gt;’
  sandbox.cpp:20:10:   instantiated from here
  /usr/include/boost/mpl/eval_if.hpp:60:31: error: no type named ‘type’ in ‘boost::mpl::eval_if_c&lt;false, boost::range_const_iterator&lt;const long unsigned int*&gt;, boost::range_mutable_iterator&lt;const long unsigned int*&gt; &gt;::f_ {aka struct boost::range_mutable_iterator&lt;const long unsigned int*&gt;}’
  sandbox.cpp:20:10: error: invalid initialization of non-const reference of type ‘void (&amp;)(const size_t*, const size_t*) {aka void (&amp;)(const long unsigned int*, const long unsigned int*)}’ from an rvalue of type ‘&lt;unresolved overloaded function type&gt;’
  make: *** [sandbox] Error 1
  </code></pre>