Determining if a sequence is a palindrome
Following is my solution. It's much less code. It also handles the case of string literals correctly (e.g., is_palindrome("aba")).

In modern C++ (11 and onward), there is no need to differentiate predicate and non-predicate versions of generic algorithms. The fact that the standard library does overload predicate and non-predicate versions is simply due to historical reasons. See this S.O. topic for details.

#include &lt;functional&gt;
#include &lt;iterator&gt;
#include &lt;utility&gt;

template &lt;typename Iterator, typename Pred = std::equal_to&lt;void&gt;&gt;
bool is_palindrome(Iterator beg, Iterator end, Pred pred = Pred{}) {
  if (beg == end) return true;
  end = std::prev(end);
  if (beg == end) return true;
  do {
    if (! pred(*beg++, *end--)) return false;
  }
  while (beg != end &amp;&amp; beg != std::next(end));
  return true;
}

template &lt;typename T, typename Pred = std::equal_to&lt;void&gt;&gt;
bool is_palindrome(const T&amp; x, Pred pred = Pred{}) {
  return is_palindrome(std::begin(x), std::end(x), std::move(pred));
}

template &lt;std::size_t n, typename Pred = std::equal_to&lt;void&gt;&gt;
bool is_palindrome(const char (&amp;x)[n], Pred pred = Pred{}) {
  return is_palindrome(x, x + n - 1, std::move(pred));
}