title: Why use a reference to get a *char? Isn't better to not use references when we are using pointers?
body: <p>(I will have a set of questions at the end)When i have to create a function that takes a pointer <code>const char*</code> as example, i never use a reference because i thought it makes no sense to use a reference to a pointer. But in a book (C++ Primer Fifht Edition) the author tell us that we have to create out version of a funcition called <code>compare</code> to compare our c-style string so we avoid using the general template version</p>
  
  <pre><code>template &lt;&gt;
  int compare(const char* const &amp;p1, const char* const &amp;p2)
  { return strcmp(p1, p2); }
  </code></pre>
  
  <p>Yes he's actually declaring that the pointers are const. And, the author actually write another function that only takes string literals</p>
  
  <pre><code>template&lt;size_t N, size_t M&gt;
  int compare(const char (&amp;)[N], const char (&amp;)[M]);
  </code></pre>
  
  <p>So my questions are:</p>
  
  <ol>
  <li>Why is he using a reference to get a pointer? Copy a pointer or take a reference are equally expensive, isn't it?</li>
  <li>Can't the first version take string literals?</li>
  <li>Why is he using a template for a function that does not require template paremeters? He is trying to overload another template funcion put thats not enought reason, is it?</li>
  </ol>