Merge changes from Trunk.

[SVN r47307]
This commit is contained in:
John Maddock
2008-07-11 11:49:03 +00:00
parent 9546df1f23
commit a08e8b5c85
96 changed files with 1386 additions and 1611 deletions

View File

@ -368,8 +368,6 @@ struct BaseRegexConcept
// access:
const Regex ce;
bool b = ce.empty();
ignore_unused_variable_warning(b);
unsigned i = ce.mark_count();
ignore_unused_variable_warning(i);
m_flags = ce.flags();
@ -385,7 +383,7 @@ struct BaseRegexConcept
typedef typename sub_match_type::iterator sub_iter_type;
BOOST_STATIC_ASSERT((::boost::is_same<sub_value_type, value_type>::value));
BOOST_STATIC_ASSERT((::boost::is_same<sub_iter_type, BidiIterator>::value));
b = m_sub.matched;
bool b = m_sub.matched;
ignore_unused_variable_warning(b);
BidiIterator bi = m_sub.first;
ignore_unused_variable_warning(bi);
@ -806,6 +804,8 @@ struct BoostRegexConcept
ignore_unused_variable_warning(i2);
bool b = ce == ce2;
ignore_unused_variable_warning(b);
b = ce.empty();
ignore_unused_variable_warning(b);
b = ce != ce2;
ignore_unused_variable_warning(b);
b = ce < ce2;

View File

@ -119,7 +119,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k,
//
// Add it to the list, and index it:
//
s_data.cont.push_back(value_type(result, 0));
s_data.cont.push_back(value_type(result, static_cast<Key const*>(0)));
s_data.index.insert(std::make_pair(k, --(s_data.cont.end())));
s_data.cont.back().second = &(s_data.index.find(k)->first);
map_size_type s = s_data.index.size();

View File

@ -68,6 +68,7 @@ Accepts UTF-32 code points and forwards them on as UTF-16 code points.
#include <stdexcept>
#ifndef BOOST_NO_STD_LOCALE
#include <sstream>
#include <ios>
#endif
#include <limits.h> // CHAR_BIT

View File

@ -1270,6 +1270,19 @@ void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* st
state = state->next.p;
continue;
}
if((static_cast<re_brace*>(state)->index == -1)
|| (static_cast<re_brace*>(state)->index == -2))
{
// skip past the zero width assertion:
state = static_cast<const re_jump*>(state->next.p)->alt.p->next.p;
continue;
}
if(static_cast<re_brace*>(state)->index == -3)
{
// Have to skip the leading jump state:
state = state->next.p->next.p;
continue;
}
return;
case syntax_element_endmark:
case syntax_element_start_line:

View File

@ -71,32 +71,39 @@ template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHA
# ifdef __GNUC__
# define template __extension__ extern template
# else
# if BOOST_MSVC > 1310
# define BOOST_REGEX_TEMPLATE_DECL
# endif
# define template extern template
# endif
# endif
#ifndef BOOST_REGEX_TEMPLATE_DECL
# define BOOST_REGEX_TEMPLATE_DECL BOOST_REGEX_DECL
#endif
# ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4251 4231 4660)
# endif
template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >;
template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >;
#endif
#ifndef BOOST_NO_STD_ALLOCATOR
template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
#endif
#if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\
&& !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\
&& !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\
&& !defined(BOOST_REGEX_ICU_INSTANCES)
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
template class BOOST_REGEX_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >;
template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >;
#endif
#ifndef BOOST_NO_STD_ALLOCATOR
template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >;
template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >;
#endif
#endif
@ -109,6 +116,8 @@ template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher< std::basic_str
# undef template
# endif
#undef BOOST_REGEX_TEMPLATE_DECL
#elif (defined(__GNUC__) && (__GNUC__ >= 3))
# ifndef BOOST_REGEX_INSTANTIATE

View File

@ -535,7 +535,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
if(position == last)
return false;
// both prev and this character must be m_word_mask:
if(traits_inst.isctype(*position, m_word_mask))
bool prev = traits_inst.isctype(*position, m_word_mask);
{
bool b;
if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
@ -546,7 +546,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
b = traits_inst.isctype(*position, m_word_mask);
++position;
}
if(b)
if(b == prev)
{
pstate = pstate->next.p;
return true;

View File

@ -1193,6 +1193,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_char_repeat(bool r)
pstate = rep->next.p;
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
// remember where we got to if this is a leading repeat:
if((rep->leading) && (count < rep->max))
restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state:
@ -1259,6 +1262,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat(bool
pstate = rep->next.p;
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
// remember where we got to if this is a leading repeat:
if((rep->leading) && (count < rep->max))
restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state:
@ -1326,6 +1332,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool
pstate = rep->next.p;
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
// remember where we got to if this is a leading repeat:
if((rep->leading) && (count < rep->max))
restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state: