forked from boostorg/regex
Fixed messed up c_regex_traits from previous commit, fixed Koenig lookup bug caused by presence of boost::re_detail::destroy
[SVN r11249]
This commit is contained in:
@ -1074,7 +1074,7 @@ match_results_base<iterator, Allocator>::match_results_base(const Allocator& a)
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
::boost::re_detail::destroy(ref);
|
||||
::boost::re_detail::pointer_destroy(ref);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1115,10 +1115,10 @@ void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::free()
|
||||
p2 = p1 + ref->cmatches;
|
||||
while(p1 != p2)
|
||||
{
|
||||
::boost::re_detail::destroy(p1);
|
||||
::boost::re_detail::pointer_destroy(p1);
|
||||
++p1;
|
||||
}
|
||||
::boost::re_detail::destroy(ref);
|
||||
::boost::re_detail::pointer_destroy(ref);
|
||||
a.deallocate((char*)(void*)ref, sizeof(sub_match<iterator>) * ref->cmatches + sizeof(c_reference));
|
||||
}
|
||||
}
|
||||
@ -1169,10 +1169,10 @@ void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_typ
|
||||
p2 = (sub_match<iterator>*)(newref+1);
|
||||
while(p2 != p1)
|
||||
{
|
||||
::boost::re_detail::destroy(p2);
|
||||
::boost::re_detail::pointer_destroy(p2);
|
||||
++p2;
|
||||
}
|
||||
::boost::re_detail::destroy(ref);
|
||||
::boost::re_detail::pointer_destroy(ref);
|
||||
throw;
|
||||
}
|
||||
ref = newref;
|
||||
@ -1211,10 +1211,10 @@ void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_typ
|
||||
p2 = (sub_match<iterator>*)(newref+1);
|
||||
while(p2 != p1)
|
||||
{
|
||||
::boost::re_detail::destroy(p2);
|
||||
::boost::re_detail::pointer_destroy(p2);
|
||||
++p2;
|
||||
}
|
||||
::boost::re_detail::destroy(ref);
|
||||
::boost::re_detail::pointer_destroy(ref);
|
||||
throw;
|
||||
}
|
||||
ref = newref;
|
||||
@ -1316,10 +1316,10 @@ void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::cow()
|
||||
p2 = (sub_match<iterator>*)(newref+1);
|
||||
while(p2 != p1)
|
||||
{
|
||||
::boost::re_detail::destroy(p2);
|
||||
::boost::re_detail::pointer_destroy(p2);
|
||||
++p2;
|
||||
}
|
||||
::boost::re_detail::destroy(ref);
|
||||
::boost::re_detail::pointer_destroy(ref);
|
||||
throw;
|
||||
}
|
||||
--(ref->count);
|
||||
@ -1436,10 +1436,10 @@ match_results<iterator, Allocator>::match_results(const match_results<iterator,
|
||||
p2 = (sub_match<iterator>*)(this->ref+1);
|
||||
while(p2 != p1)
|
||||
{
|
||||
re_detail::destroy(p2);
|
||||
re_detail::pointer_destroy(p2);
|
||||
++p2;
|
||||
}
|
||||
re_detail::destroy(this->ref);
|
||||
re_detail::pointer_destroy(this->ref);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ namespace std{
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* helper functions construct/destroy:
|
||||
* helper functions pointer_construct/pointer_destroy:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
@ -531,11 +531,11 @@ namespace std{
|
||||
namespace boost{ namespace re_detail{
|
||||
|
||||
template <class T>
|
||||
inline void destroy(T* p)
|
||||
inline void pointer_destroy(T* p)
|
||||
{ p->~T(); }
|
||||
|
||||
template <class T>
|
||||
inline void construct(T* p, const T& t)
|
||||
inline void pointer_construct(T* p, const T& t)
|
||||
{ new (p) T(t); }
|
||||
|
||||
}} // namespaces
|
||||
|
@ -104,8 +104,8 @@ void BOOST_REGEX_CALL re_skip_format(const charT*& fmt, const traits_type& trait
|
||||
template <class T>
|
||||
inline void oi_assign(T* p, T v)
|
||||
{
|
||||
::boost::re_detail::destroy(p);
|
||||
construct(p, v);
|
||||
::boost::re_detail::pointer_destroy(p);
|
||||
pointer_construct(p, v);
|
||||
}
|
||||
|
||||
#else
|
||||
|
@ -215,7 +215,7 @@ void _priv_match_data<iterator, Allocator>::free()
|
||||
i_alloc temp1(temp_match.allocator());
|
||||
temp1.deallocate(accumulators, caccumulators);
|
||||
for(unsigned i = 0; i < caccumulators; ++i)
|
||||
::boost::re_detail::destroy(loop_starts + i);
|
||||
::boost::re_detail::pointer_destroy(loop_starts + i);
|
||||
it_alloc temp2(temp_match.allocator());
|
||||
temp2.deallocate(loop_starts, caccumulators);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
{
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
::boost::re_detail::destroy(m_stack->end);
|
||||
::boost::re_detail::pointer_destroy(m_stack->end);
|
||||
++(m_stack->end);
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ public:
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
t = *m_stack->end;
|
||||
::boost::re_detail::destroy(m_stack->end);
|
||||
::boost::re_detail::pointer_destroy(m_stack->end);
|
||||
++(m_stack->end);
|
||||
}
|
||||
|
||||
@ -137,7 +137,7 @@ public:
|
||||
if(m_stack->end == m_stack->last)
|
||||
push_aux();
|
||||
--(m_stack->end);
|
||||
construct(m_stack->end, t);
|
||||
pointer_construct(m_stack->end, t);
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -132,17 +132,17 @@ public:
|
||||
// classes (we will static-assert that later):
|
||||
//
|
||||
char_class_none = 0,
|
||||
char_class_alpha = 0x0100,
|
||||
char_class_cntrl = 0x0020,
|
||||
char_class_alpha = 0x0001,
|
||||
char_class_cntrl = 0x0002,
|
||||
char_class_digit = 0x0004,
|
||||
char_class_lower = 0x0002,
|
||||
char_class_lower = 0x0008,
|
||||
char_class_punct = 0x0010,
|
||||
char_class_space = 0x0008,
|
||||
char_class_upper = 0x0001,
|
||||
char_class_space = 0x0020,
|
||||
char_class_upper = 0x0040,
|
||||
char_class_xdigit = 0x0080,
|
||||
char_class_blank = 0x0040,
|
||||
char_class_unicode = 0x8000,
|
||||
char_class_blank = 0x0100,
|
||||
char_class_underscore = 0x4000,
|
||||
char_class_unicode = 0x8000,
|
||||
|
||||
char_class_alnum = char_class_alpha | char_class_digit,
|
||||
char_class_graph = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore,
|
||||
@ -360,17 +360,6 @@ struct BOOST_REGEX_DECL w32_traits_base : public regex_traits_base
|
||||
char_class_win = 0x01FF
|
||||
};
|
||||
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_alpha == c_traits_base::char_class_alpha);
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_cntrl == c_traits_base::char_class_cntrl);
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_digit == c_traits_base::char_class_digit);
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_lower == c_traits_base::char_class_lower);
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_punct == c_traits_base::char_class_punct);
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_space == c_traits_base::char_class_space);
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_upper == c_traits_base::char_class_upper);
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_xdigit == c_traits_base::char_class_xdigit);
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_blank == c_traits_base::char_class_blank);
|
||||
BOOST_STATIC_ASSERT(w32_traits_base::char_class_underscore == c_traits_base::char_class_underscore);
|
||||
|
||||
|
||||
public:
|
||||
static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
|
||||
@ -394,6 +383,7 @@ public:
|
||||
static char* BOOST_REGEX_CALL get_catalogue() { return regex_message_catalogue; }
|
||||
};
|
||||
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
template<class charT>
|
||||
|
Reference in New Issue
Block a user