reorganised regex config setup

[SVN r10064]
This commit is contained in:
John Maddock
2001-05-08 11:24:35 +00:00
parent fb81ff65fc
commit efd0ce56bc
53 changed files with 377 additions and 2346 deletions

View File

@ -16,7 +16,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE regex_kmp.hpp
* VERSION 3.10
* VERSION 3.11
* DESCRIPTION: Provides Knuth Morris Pratt search operations.
* Note this is an internal header file included
* by regex.hpp, do not include on its own.
@ -53,17 +53,17 @@ struct kmp_info
template <class charT, class Allocator>
void kmp_free(kmp_info<charT>* pinfo, const Allocator& a)
{
typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(char, Allocator) atype;
typedef typename boost::re_detail::rebind_allocator<char, Allocator>::type atype;
atype(a).deallocate((char*)pinfo, pinfo->size);
}
template <class iterator, class charT, class Trans, class Allocator>
kmp_info<charT>* kmp_compile(iterator first, iterator last, charT, Trans translate, const Allocator& a)
{
typedef BOOST_RE_MAYBE_TYPENAME REBIND_TYPE(char, Allocator) atype;
typedef typename boost::re_detail::rebind_allocator<char, Allocator>::type atype;
int i, j, m;
i = 0;
BOOST_RE_DISTANCE(first, last, m);
m = boost::re_detail::distance(first, last);
++m;
unsigned int size = sizeof(kmp_info<charT>) + sizeof(int)*m + sizeof(charT)*m;
--m;