title: std::end with raw arrays of char
body: <p>By default, the <code>std::end</code> overload for raw arrays looks something like this:</p>
  
  <pre><code>template&lt;class T, std::size_t N&gt;
  T* end(T (&amp;array)[N])
  { return array + N; }
  </code></pre>
  
  <p>However, this overload was undesirable for me when passing a string literal or a <code>char</code> array, as they both have an implicit <code>\0</code> at the end which gets counted.</p>
  
  <p>I thought as a workaround I could overload <code>end</code> in my own namespace:</p>
  
  <p><strong>Example</strong>:</p>
  
  <pre><code>namespace unique
  {
      const char* end(const char (&amp;array)[5])
      {
          return array + 4;
      }
      const char* end(const char (&amp;array)[11])
      {
          return array + 10;
      }
  }
  
  int main()
  {
      using std::begin;
      using std::end;
      using unique::end;
      const char str1[] = "XXXTEXTXXX";
      const char str2[] = "TEXT";
      auto iter = std::search(begin(str1), end(str1), begin(str2), end(str2));
      //...
  }
  </code></pre>
  
  <p>However, that would require a lot of overloads to write.</p>
  
  <p><strong>QUESTION</strong></p>
  
  <p>I realize using <code>std::string</code> or another container would solve my problem. However, I wanted to be able to call <code>end</code> unqualified with a string literal or raw array and have it omit the null terminator as above. Is there a better approach that would avoid writing the overloads?</p>