mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 22:02:08 +02:00
Regex: Remove obsolete GCC version checks.
[SVN r86065]
This commit is contained in:
@ -431,20 +431,10 @@ re_syntax_base* basic_regex_creator<charT, traits>::append_set(
|
||||
if(flags() & regex_constants::collate)
|
||||
{
|
||||
// we need to transform our range into sort keys:
|
||||
#if BOOST_WORKAROUND(__GNUC__, < 3)
|
||||
string_type in(3, charT(0));
|
||||
in[0] = c1.first;
|
||||
in[1] = c1.second;
|
||||
s1 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1));
|
||||
in[0] = c2.first;
|
||||
in[1] = c2.second;
|
||||
s2 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1));
|
||||
#else
|
||||
charT a1[3] = { c1.first, c1.second, charT(0), };
|
||||
charT a2[3] = { c2.first, c2.second, charT(0), };
|
||||
s1 = this->m_traits.transform(a1, (a1[1] ? a1+2 : a1+1));
|
||||
s2 = this->m_traits.transform(a2, (a2[1] ? a2+2 : a2+1));
|
||||
#endif
|
||||
if(s1.size() == 0)
|
||||
s1 = string_type(1, charT(0));
|
||||
if(s2.size() == 0)
|
||||
@ -489,15 +479,8 @@ re_syntax_base* basic_regex_creator<charT, traits>::append_set(
|
||||
string_type s;
|
||||
if(first->second)
|
||||
{
|
||||
#if BOOST_WORKAROUND(__GNUC__, < 3)
|
||||
string_type in(3, charT(0));
|
||||
in[0] = first->first;
|
||||
in[1] = first->second;
|
||||
s = m_traits.transform_primary(in.c_str(), in.c_str()+2);
|
||||
#else
|
||||
charT cs[3] = { first->first, first->second, charT(0), };
|
||||
s = m_traits.transform_primary(cs, cs+2);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
s = m_traits.transform_primary(&first->first, &first->first+1);
|
||||
|
@ -458,11 +458,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()
|
||||
if(position != last)
|
||||
{
|
||||
// prev and this character must be opposites:
|
||||
#if defined(BOOST_REGEX_USE_C_LOCALE) && defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
|
||||
b = traits::isctype(*position, m_word_mask);
|
||||
#else
|
||||
b = traits_inst.isctype(*position, m_word_mask);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user