mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 13:52:17 +02:00
Tweaked dll selection code,
Fixed various errors detected by MWCW and Como [SVN r18493]
This commit is contained in:
@ -136,7 +136,7 @@ BOOST_LIB_DEBUG_OPT: nothing for release builds,
|
|||||||
#if defined(BOOST_REGEX_STATIC_LINK) && defined(BOOST_REGEX_DYN_LINK)
|
#if defined(BOOST_REGEX_STATIC_LINK) && defined(BOOST_REGEX_DYN_LINK)
|
||||||
# undef BOOST_REGEX_STATIC_LINK
|
# undef BOOST_REGEX_STATIC_LINK
|
||||||
#endif
|
#endif
|
||||||
#if (defined(_DLL) || defined(_RTLDLL)) && !defined(BOOST_REGEX_STATIC_LINK)
|
#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_REGEX_DYN_LINK)
|
||||||
# define BOOST_LIB_PREFIX
|
# define BOOST_LIB_PREFIX
|
||||||
#else
|
#else
|
||||||
# define BOOST_LIB_PREFIX "lib"
|
# define BOOST_LIB_PREFIX "lib"
|
||||||
@ -149,7 +149,7 @@ BOOST_LIB_DEBUG_OPT: nothing for release builds,
|
|||||||
# define BOOST_LIB_DEBUG_OPT "dd"
|
# define BOOST_LIB_DEBUG_OPT "dd"
|
||||||
#elif defined(BOOST_MSVC) && defined(_DEBUG)
|
#elif defined(BOOST_MSVC) && defined(_DEBUG)
|
||||||
# define BOOST_LIB_DEBUG_OPT "d"
|
# define BOOST_LIB_DEBUG_OPT "d"
|
||||||
#elif defined(__BORLANDC__) && (__BORLANDC__ == 0x560) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
|
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
|
||||||
# define BOOST_LIB_DEBUG_OPT "dd"
|
# define BOOST_LIB_DEBUG_OPT "dd"
|
||||||
#else
|
#else
|
||||||
# define BOOST_LIB_DEBUG_OPT
|
# define BOOST_LIB_DEBUG_OPT
|
||||||
|
@ -362,7 +362,7 @@ public:
|
|||||||
|
|
||||||
template <class I>
|
template <class I>
|
||||||
basic_regex(I first, I last, flag_type f = regex_constants::normal, const Allocator& al = Allocator())
|
basic_regex(I first, I last, flag_type f = regex_constants::normal, const Allocator& al = Allocator())
|
||||||
: reg_expression<charT, traits, Allocator>(first, last, f, a){}
|
: reg_expression<charT, traits, Allocator>(first, last, f, al){}
|
||||||
|
|
||||||
template <class ST, class SA>
|
template <class ST, class SA>
|
||||||
basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
|
basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
|
||||||
|
@ -140,7 +140,7 @@ public:
|
|||||||
}
|
}
|
||||||
const_iterator end() const
|
const_iterator end() const
|
||||||
{
|
{
|
||||||
m_subs.end();
|
return m_subs.end();
|
||||||
}
|
}
|
||||||
// format:
|
// format:
|
||||||
template <class OutputIterator>
|
template <class OutputIterator>
|
||||||
|
@ -761,14 +761,14 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_paren(boo
|
|||||||
}
|
}
|
||||||
// unwind stack:
|
// unwind stack:
|
||||||
m_backup_state = pmp+1;
|
m_backup_state = pmp+1;
|
||||||
destroy(pmp);
|
boost::re_detail::destroy(pmp);
|
||||||
return true; // keep looking
|
return true; // keep looking
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_recursion_stopper(bool)
|
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_recursion_stopper(bool)
|
||||||
{
|
{
|
||||||
destroy(m_backup_state++);
|
boost::re_detail::destroy(m_backup_state++);
|
||||||
pstate = 0; // nothing left to search
|
pstate = 0; // nothing left to search
|
||||||
return false; // end of stack nothing more to search
|
return false; // end of stack nothing more to search
|
||||||
}
|
}
|
||||||
@ -781,7 +781,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_assertion
|
|||||||
position = pmp->position;
|
position = pmp->position;
|
||||||
bool result = (r == pmp->positive);
|
bool result = (r == pmp->positive);
|
||||||
m_recursive_result = pmp->positive ? r : !r;
|
m_recursive_result = pmp->positive ? r : !r;
|
||||||
destroy(pmp++);
|
boost::re_detail::destroy(pmp++);
|
||||||
m_backup_state = pmp;
|
m_backup_state = pmp;
|
||||||
return !result; // return false if the assertion was matched to stop search.
|
return !result; // return false if the assertion was matched to stop search.
|
||||||
}
|
}
|
||||||
@ -795,7 +795,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_alt(bool
|
|||||||
pstate = pmp->pstate;
|
pstate = pmp->pstate;
|
||||||
position = pmp->position;
|
position = pmp->position;
|
||||||
}
|
}
|
||||||
destroy(pmp++);
|
boost::re_detail::destroy(pmp++);
|
||||||
m_backup_state = pmp;
|
m_backup_state = pmp;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@ -804,7 +804,7 @@ template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
|||||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_repeater_counter(bool)
|
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_repeater_counter(bool)
|
||||||
{
|
{
|
||||||
saved_repeater<BidiIterator>* pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
|
saved_repeater<BidiIterator>* pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
|
||||||
destroy(pmp++);
|
boost::re_detail::destroy(pmp++);
|
||||||
m_backup_state = pmp;
|
m_backup_state = pmp;
|
||||||
return true; // keep looking
|
return true; // keep looking
|
||||||
}
|
}
|
||||||
@ -816,7 +816,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_extra_blo
|
|||||||
void* condemmed = m_stack_base;
|
void* condemmed = m_stack_base;
|
||||||
m_stack_base = pmp->base;
|
m_stack_base = pmp->base;
|
||||||
m_backup_state = pmp->end;
|
m_backup_state = pmp->end;
|
||||||
destroy(pmp);
|
boost::re_detail::destroy(pmp);
|
||||||
block_cache.put(condemmed);
|
block_cache.put(condemmed);
|
||||||
return true; // keep looking
|
return true; // keep looking
|
||||||
}
|
}
|
||||||
@ -825,7 +825,7 @@ template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
|||||||
inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::destroy_single_repeat()
|
inline void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::destroy_single_repeat()
|
||||||
{
|
{
|
||||||
saved_single_repeat<BidiIterator>* p = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
|
saved_single_repeat<BidiIterator>* p = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
|
||||||
destroy(p++);
|
boost::re_detail::destroy(p++);
|
||||||
m_backup_state = p;
|
m_backup_state = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1195,7 +1195,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::unwind_non_greed
|
|||||||
pstate = pmp->pstate;
|
pstate = pmp->pstate;
|
||||||
++(*next_count);
|
++(*next_count);
|
||||||
}
|
}
|
||||||
destroy(pmp++);
|
boost::re_detail::destroy(pmp++);
|
||||||
m_backup_state = pmp;
|
m_backup_state = pmp;
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -47,8 +47,9 @@ namespace boost{
|
|||||||
template <class T, class Allocator = BOOST_DEFAULT_ALLOCATOR(T) >
|
template <class T, class Allocator = BOOST_DEFAULT_ALLOCATOR(T) >
|
||||||
class jstack
|
class jstack
|
||||||
{
|
{
|
||||||
private:
|
public:
|
||||||
typedef typename boost::detail::rebind_allocator<unsigned char, Allocator>::type allocator_type;
|
typedef typename boost::detail::rebind_allocator<unsigned char, Allocator>::type allocator_type;
|
||||||
|
private:
|
||||||
typedef typename boost::detail::rebind_allocator<T, Allocator>::type T_alloc_type;
|
typedef typename boost::detail::rebind_allocator<T, Allocator>::type T_alloc_type;
|
||||||
typedef typename T_alloc_type::size_type size_type;
|
typedef typename T_alloc_type::size_type size_type;
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
|
@ -42,7 +42,7 @@ class regex_token_iterator_implementation
|
|||||||
const regex_type* pre; // the expression
|
const regex_type* pre; // the expression
|
||||||
match_flag_type flags; // match flags
|
match_flag_type flags; // match flags
|
||||||
std::basic_string<charT> result; // the current string result
|
std::basic_string<charT> result; // the current string result
|
||||||
std::vector<int>::size_type N; // the current sub-expression being enumerated
|
int N; // the current sub-expression being enumerated
|
||||||
std::vector<int> subs; // the sub-expressions to enumerate
|
std::vector<int> subs; // the sub-expressions to enumerate
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Reference in New Issue
Block a user