Boost logo

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:
// gcc on win32 has problems if you include <windows.h>
// (sporadically generates bad code).
# define BOOST_REGEX_NO_W32

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) &&

Adding a !defined(BOOST_REGEX_NO_W32) test here fixed the problem:

$ diff regress.h*
< #if defined(_WIN32) && !defined(BOOST_RE_TEST_LOCALE_CPP) &&
!defined(BOOST_RE_TEST_LOCALE_C) && !defined(BOOST_REGEX_NO_W32) &&

> #if defined(_WIN32) && !defined(BOOST_RE_TEST_LOCALE_CPP) &&
Would a developer like to check this for sanity and update the CVS?
Raoul Gough.
Do You Yahoo!?
Get your free address at

Boost list run by bdawes at, gregod at, cpdaniel at, john at