Hello,

I am trying to compile the following source file using gcc on cygwin and stlport:


//--------------------------------------
//cygwin_stl.cpp
#include <boost/graph/graphviz.hpp>

int main()
{
    return 0;
}

//--------------------------------------

with the following commandline:

//--------------------------------------
$ gcc cygwin_stl.cpp -I /cygdrive/y/STLPORT/STLport-5.2.1/stlport/ -I /cygdrive/y/BOOST/boost_1_52_0/
//--------------------------------------

and this is resulting in an assertion inside boost/xpressive/traits/cpp_regex_tratis.hpp at line 74 as:

//--------------------------------------
/cygdrive/y/BOOST/boost_1_52_0/boost/xpressive/traits/cpp_regex_traits.hpp:74:9: error: no matching function for call to ‘assertion_failed(mpl_::failed************ mpl_::assert_relation<(mpl_::assert_::relations)1u, -0x000000069l, 2l>::************)’
//--------------------------------------

Complete error message attached.

It appears that the boost header has a conditional compilation for __CYGWIN__ where it asserts a property of the STL std::ctype_base headers that come with cygwin. But as I am using STLport, the assertion does not hold true any longer, but I do have the preprocessor macro  __CYGWIN__ defined.

The code in cpp_regex_traits.hpp is as follows:

//--------------------------------------
#ifdef __CYGWIN__
// Work around a gcc warning on cygwin
template<>
struct mask_cast<std::ctype_base::print>
{
    BOOST_MPL_ASSERT_RELATION('\227', ==, std::ctype_base::print);
    BOOST_STATIC_CONSTANT(umaskex_t, value = 0227);
};
#endif

//--------------------------------------

I do have __CYGWIN__ as I am on cygwin, but the STL header is coming from STLport, thus the assertion fails.

Is there anyway I can work around this issue? or is it a bug in the boost header where it the test for  __CYGWIN__ is insufficient? as a third party STL can be used with cygwin, in which case the assertion is invalid.

Thanks