|
Boost : |
From: Raoul Gough (RaoulGough_at_[hidden])
Date: 2002-05-09 04:56:42
I've located a problem building the regex regression tests under cygwin (at
least with the -mno-cygwin option, probably in the usual case as well). The
error message is as follows:
In file included from regress/parse.cpp:26:
regress/regress.h:423: `w32_regex_traits' undeclared in namespace `boost'
regress/regress.h:423: parse error before `>'
and is caused by regress.hpp and regex/config.hpp using different conditions
to decide on whether w32_regex_traits should exist or not. Specifically,
config.hpp prevents the definition of the w32 stuff if __GNUC__ is defined:
#if defined(__GNUC__) && (defined(_WIN32) || defined(__CYGWIN__))
// gcc on win32 has problems merging switch statements in templates:
# define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
// gcc on win32 has problems if you include <windows.h>
// (sporadically generates bad code).
# define BOOST_REGEX_USE_C_LOCALE
# define BOOST_REGEX_NO_W32
#endif
regress.hpp doesn't do this, and assumes that w32_regex_traits is always
available under Win32:
#if defined(_WIN32) && !defined(BOOST_RE_TEST_LOCALE_CPP) &&
!defined(BOOST_RE_TEST_LOCALE_C) && !defined(BOOST_RE_TEST_LOCALE_W32)
#define BOOST_RE_TEST_LOCALE_W32
#endif
Adding a !defined(BOOST_REGEX_NO_W32) test here fixed the problem:
$ diff regress.h*
417c417
< #if defined(_WIN32) && !defined(BOOST_RE_TEST_LOCALE_CPP) &&
!defined(BOOST_RE_TEST_LOCALE_C) && !defined(BOOST_REGEX_NO_W32) &&
!defined(BOOST_RE_TEST_LOCALE_W32)
--- > #if defined(_WIN32) && !defined(BOOST_RE_TEST_LOCALE_CPP) && !defined(BOOST_RE_TEST_LOCALE_C) && !defined(BOOST_RE_TEST_LOCALE_W32) Would a developer like to check this for sanity and update the CVS? Regards, Raoul Gough. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk