Boost C++ Libraries: Ticket #12814: BOOST_TEST_EQ has wrong behavior for const char* https://svn.boost.org/trac10/ticket/12814 <p> BOOST_TEST_EQ internally compares its arguments using test_eq_impl, which calls operator==. If BOOST_TEST_EQ is called with two c-strings of type const char*, it compares the addresses, not the strings. </p> <p> The following fails, while it should succeed: </p> <p> const char* s1 = "abc"; std::string s2("abc"); BOOST_TEST_EQ(s1, s2.c_str()); <em> fails </em></p> <p> Solution: Add an overload for boost::detail::test_eq_impl which compares const char* using std::strcmp. </p> <p> Similarly for test_ne_impl. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12814 Trac 1.4.3