|
Boost : |
From: Joel de Guzman (joel_at_[hidden])
Date: 2004-07-12 21:48:17
Joel de Guzman wrote:
> Hi,
>
> I'm having some minor problems with Boost.Test.
> Using g++3.2, MinGW, I get:
>
> In file included from
> ../../../boost/test/included/unit_test_framework.hpp:20,
> from ../../../libs/spirit/test/actor/unit_test.cpp:9:
> ../../../libs/test/src/test_tools.cpp: In function `bool
> boost::test_tools::tt_detail::equal_and_continue_impl(const wchar_t*,
> const
> wchar_t*, boost::wrap_stringstream&,
> boost::unit_test::basic_cstring<const
> char>, unsigned int, boost::unit_test::log_level)':
> ../../../libs/test/src/test_tools.cpp:188: `wcscmp' undeclared in
> namespace `
> std'
>
> unit_test.cpp is just:
> #include <boost/test/included/unit_test_framework.hpp>
IMO, there's nothing wrong with using namespace std; in local
scope. Here's a fix:
bool
equal_and_continue_impl( wchar_t const* left, wchar_t const* right,
wrap_stringstream& message,
const_string file_name, std::size_t line_num,
unit_test::log_level loglevel )
{
using namespace std;
bool predicate = (left && right) ? wcscmp( left, right ) == 0 : (left ==
right);
...
}
Cheers,
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk