make msvc happy with the ticket 6715 test case.

This commit is contained in:
Neil Groves
2014-03-03 00:26:22 +00:00
parent 63acc5c633
commit 132828a8db

View File

@@ -12,6 +12,7 @@
#include <boost/test/test_tools.hpp> #include <boost/test/test_tools.hpp>
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <string>
namespace boost namespace boost
{ {
@@ -19,12 +20,18 @@ namespace boost
{ {
class str_ref : public boost::iterator_range<const char*> class str_ref : public boost::iterator_range<const char*>
{ {
public:
explicit str_ref(const std::string& str)
: boost::iterator_range<const char*>(
str.c_str(), str.c_str() + str.size())
{
}
}; };
void test_ticket_6715_iterator_range_equality() void test_ticket_6715_iterator_range_equality()
{ {
str_ref a; str_ref a("test");
str_ref b; str_ref b("test");
BOOST_CHECK(a == b); BOOST_CHECK(a == b);
} }
} }