mingw dll specific fixes.

Disable one SGI test - compiler deduces template arguments strangely.


[SVN r25270]
This commit is contained in:
John Maddock
2004-09-20 12:31:08 +00:00
parent 138d526839
commit c0e6b1f5a2
3 changed files with 7 additions and 0 deletions

View File

@ -588,6 +588,7 @@ std::string RegEx::What(int i)const
return result; return result;
} }
#ifndef __MINGW32__
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
const std::size_t RegEx::npos = ::boost::integer_traits<std::size_t>::const_max; const std::size_t RegEx::npos = ::boost::integer_traits<std::size_t>::const_max;
#elif defined(BOOST_HAS_LONG_LONG) #elif defined(BOOST_HAS_LONG_LONG)
@ -595,6 +596,7 @@ const std::size_t RegEx::npos = ~0ULL;
#else #else
const std::size_t RegEx::npos = ~0UL; const std::size_t RegEx::npos = ~0UL;
#endif #endif
#endif
} // namespace boost } // namespace boost

View File

@ -48,6 +48,8 @@ template test-dll
: <template>../build/regex-dll-options : <template>../build/regex-dll-options
<dll>../build/boost_regex # sources <dll>../build/boost_regex # sources
: <threading>multi : <threading>multi
<mingw><*><linkflags>"-Wl,--allow-multiple-definition"
<mingw-3.4.1><*><linkflags>"-Wl,--allow-multiple-definition"
; ;
# #

View File

@ -35,7 +35,10 @@ void test_captures(const std::string& regx, const std::string& text, T& expected
if(boost::regex_match(text, what, e, boost::match_extra)) if(boost::regex_match(text, what, e, boost::match_extra))
{ {
unsigned i, j; unsigned i, j;
#ifndef __sgi
// strange type deduction causes this test to fail on SGI:
BOOST_TEST(what.size() == ARRAY_SIZE(expected)); BOOST_TEST(what.size() == ARRAY_SIZE(expected));
#endif
for(i = 0; i < what.size(); ++i) for(i = 0; i < what.size(); ++i)
{ {
BOOST_TEST(what.captures(i).size() <= ARRAY_SIZE(expected[i])); BOOST_TEST(what.captures(i).size() <= ARRAY_SIZE(expected[i]));