title: Value equality of c_str == string vs c_str == c_str
body: <p>I'm trying to compare libpqxx <a href="http://pqxx.org/devprojects/libpqxx/doc/2.6.8/html/Reference/a00256.html#8123fd1430eb4cfaa1f5095b44ceae86" rel="nofollow"><code>c_str</code></a> values.</p>
  
  <p>If I try to compare them directly, <code>result1[0][0].c_str() == result2[0][0].c_str()</code>, for example, they do not <code>return true</code> when they have the same string values.  The only way to compare them properly is to use <code>strcmp</code>.</p>
  
  <p>However, if I'm comparing a libpqxx <code>c_str</code> to a <code>std::string</code> with <code>strcmp</code>, the compiler complains that an argument of <code>strcmp</code> cannot be a <code>std::string</code>, yet most strangely of all to me: if I compare something like <code>result1[0][0].c_str() == some_std_string</code>, the comparison will <code>return true</code> if they possess the same value, <code>false</code> otherwise.</p>
  
  <p>Why is this?  Is this something particular to libpqxx?  If not, is this standard behavior?</p>