Remove function call macros from v5 code.

This commit is contained in:
jzmaddock
2020-12-03 11:46:20 +00:00
parent eafb12b9d0
commit 2b157b4170
10 changed files with 147 additions and 147 deletions

View File

@ -237,26 +237,26 @@ public:
parser.parse(arg_first, arg_last, f);
}
locale_type BOOST_REGEX_CALL imbue(locale_type l)
locale_type imbue(locale_type l)
{
return this->m_ptraits->imbue(l);
}
locale_type BOOST_REGEX_CALL getloc()const
locale_type getloc()const
{
return this->m_ptraits->getloc();
}
std::basic_string<charT> BOOST_REGEX_CALL str()const
std::basic_string<charT> str()const
{
std::basic_string<charT> result;
if(this->m_status == 0)
result = std::basic_string<charT>(this->m_expression, this->m_expression_len);
return result;
}
const_iterator BOOST_REGEX_CALL expression()const
const_iterator expression()const
{
return this->m_expression;
}
std::pair<const_iterator, const_iterator> BOOST_REGEX_CALL subexpression(std::size_t n)const
std::pair<const_iterator, const_iterator> subexpression(std::size_t n)const
{
const std::pair<std::size_t, std::size_t>& pi = this->m_subs.at(n);
std::pair<const_iterator, const_iterator> p(expression() + pi.first, expression() + pi.second);
@ -264,27 +264,27 @@ public:
}
//
// begin, end:
const_iterator BOOST_REGEX_CALL begin()const
const_iterator begin()const
{
return (this->m_status ? 0 : this->m_expression);
}
const_iterator BOOST_REGEX_CALL end()const
const_iterator end()const
{
return (this->m_status ? 0 : this->m_expression + this->m_expression_len);
}
flag_type BOOST_REGEX_CALL flags()const
flag_type flags()const
{
return this->m_flags;
}
size_type BOOST_REGEX_CALL size()const
size_type size()const
{
return this->m_expression_len;
}
int BOOST_REGEX_CALL status()const
int status()const
{
return this->m_status;
}
size_type BOOST_REGEX_CALL mark_count()const
size_type mark_count()const
{
return this->m_mark_count - 1;
}
@ -366,11 +366,11 @@ public:
basic_regex(const basic_regex& that)
: m_pimpl(that.m_pimpl) {}
~basic_regex(){}
basic_regex& BOOST_REGEX_CALL operator=(const basic_regex& that)
basic_regex& operator=(const basic_regex& that)
{
return assign(that);
}
basic_regex& BOOST_REGEX_CALL operator=(const charT* ptr)
basic_regex& operator=(const charT* ptr)
{
return assign(ptr);
}
@ -404,7 +404,7 @@ public:
#if !defined(BOOST_NO_MEMBER_TEMPLATES)
template <class ST, class SA>
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
unsigned int set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
{
return set_expression(p.data(), p.data() + p.size(), f);
}
@ -427,13 +427,13 @@ public:
}
template <class ST, class SA>
basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
basic_regex& operator=(const std::basic_string<charT, ST, SA>& p)
{
return assign(p.data(), p.data() + p.size(), regex_constants::normal);
}
template <class string_traits, class A>
basic_regex& BOOST_REGEX_CALL assign(
basic_regex& assign(
const std::basic_string<charT, string_traits, A>& s,
flag_type f = regex_constants::normal)
{
@ -441,7 +441,7 @@ public:
}
template <class InputIterator>
basic_regex& BOOST_REGEX_CALL assign(InputIterator arg_first,
basic_regex& assign(InputIterator arg_first,
InputIterator arg_last,
flag_type f = regex_constants::normal)
{
@ -456,7 +456,7 @@ public:
return assign(static_cast<const charT*>(0), static_cast<const charT*>(0), f);
}
#else
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
unsigned int set_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
{
return set_expression(p.data(), p.data() + p.size(), f);
}
@ -466,12 +466,12 @@ public:
assign(p, f);
}
basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
basic_regex& operator=(const std::basic_string<charT>& p)
{
return assign(p.data(), p.data() + p.size(), regex_constants::normal);
}
basic_regex& BOOST_REGEX_CALL assign(
basic_regex& assign(
const std::basic_string<charT>& s,
flag_type f = regex_constants::normal)
{
@ -482,8 +482,8 @@ public:
//
// locale:
locale_type BOOST_REGEX_CALL imbue(locale_type l);
locale_type BOOST_REGEX_CALL getloc()const
locale_type imbue(locale_type l);
locale_type getloc()const
{
return m_pimpl.get() ? m_pimpl->getloc() : locale_type();
}
@ -491,62 +491,62 @@ public:
// getflags:
// retained for backwards compatibility only, "flags"
// is now the preferred name:
flag_type BOOST_REGEX_CALL getflags()const
flag_type getflags()const
{
return flags();
}
flag_type BOOST_REGEX_CALL flags()const
flag_type flags()const
{
return m_pimpl.get() ? m_pimpl->flags() : 0;
}
//
// str:
std::basic_string<charT> BOOST_REGEX_CALL str()const
std::basic_string<charT> str()const
{
return m_pimpl.get() ? m_pimpl->str() : std::basic_string<charT>();
}
//
// begin, end, subexpression:
std::pair<const_iterator, const_iterator> BOOST_REGEX_CALL subexpression(std::size_t n)const
std::pair<const_iterator, const_iterator> subexpression(std::size_t n)const
{
if(!m_pimpl.get())
boost::throw_exception(std::logic_error("Can't access subexpressions in an invalid regex."));
return m_pimpl->subexpression(n);
}
const_iterator BOOST_REGEX_CALL begin()const
const_iterator begin()const
{
return (m_pimpl.get() ? m_pimpl->begin() : 0);
}
const_iterator BOOST_REGEX_CALL end()const
const_iterator end()const
{
return (m_pimpl.get() ? m_pimpl->end() : 0);
}
//
// swap:
void BOOST_REGEX_CALL swap(basic_regex& that)throw()
void swap(basic_regex& that)throw()
{
m_pimpl.swap(that.m_pimpl);
}
//
// size:
size_type BOOST_REGEX_CALL size()const
size_type size()const
{
return (m_pimpl.get() ? m_pimpl->size() : 0);
}
//
// max_size:
size_type BOOST_REGEX_CALL max_size()const
size_type max_size()const
{
return UINT_MAX;
}
//
// empty:
bool BOOST_REGEX_CALL empty()const
bool empty()const
{
return (m_pimpl.get() ? 0 != m_pimpl->status() : true);
}
size_type BOOST_REGEX_CALL mark_count()const
size_type mark_count()const
{
return (m_pimpl.get() ? m_pimpl->mark_count() : 0);
}
@ -556,7 +556,7 @@ public:
return (m_pimpl.get() ? m_pimpl->status() : regex_constants::error_empty);
}
int BOOST_REGEX_CALL compare(const basic_regex& that) const
int compare(const basic_regex& that) const
{
if(m_pimpl.get() == that.m_pimpl.get())
return 0;
@ -570,27 +570,27 @@ public:
return flags() - that.flags();
return str().compare(that.str());
}
bool BOOST_REGEX_CALL operator==(const basic_regex& e)const
bool operator==(const basic_regex& e)const
{
return compare(e) == 0;
}
bool BOOST_REGEX_CALL operator != (const basic_regex& e)const
bool operator != (const basic_regex& e)const
{
return compare(e) != 0;
}
bool BOOST_REGEX_CALL operator<(const basic_regex& e)const
bool operator<(const basic_regex& e)const
{
return compare(e) < 0;
}
bool BOOST_REGEX_CALL operator>(const basic_regex& e)const
bool operator>(const basic_regex& e)const
{
return compare(e) > 0;
}
bool BOOST_REGEX_CALL operator<=(const basic_regex& e)const
bool operator<=(const basic_regex& e)const
{
return compare(e) <= 0;
}
bool BOOST_REGEX_CALL operator>=(const basic_regex& e)const
bool operator>=(const basic_regex& e)const
{
return compare(e) >= 0;
}
@ -598,21 +598,21 @@ public:
//
// The following are deprecated as public interfaces
// but are available for compatibility with earlier versions.
const charT* BOOST_REGEX_CALL expression()const
const charT* expression()const
{
return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0);
}
unsigned int BOOST_REGEX_CALL set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
unsigned int set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
{
assign(p1, p2, f | regex_constants::no_except);
return status();
}
unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal)
unsigned int set_expression(const charT* p, flag_type f = regex_constants::normal)
{
assign(p, f | regex_constants::no_except);
return status();
}
unsigned int BOOST_REGEX_CALL error_code()const
unsigned int error_code()const
{
return status();
}
@ -684,7 +684,7 @@ basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p
}
template <class charT, class traits>
typename basic_regex<charT, traits>::locale_type BOOST_REGEX_CALL basic_regex<charT, traits>::imbue(locale_type l)
typename basic_regex<charT, traits>::locale_type basic_regex<charT, traits>::imbue(locale_type l)
{
std::shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> > temp(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits>());
locale_type result = temp->imbue(l);
@ -742,7 +742,7 @@ public:
reg_expression(const reg_expression& that)
: basic_regex<charT, traits>(that) {}
~reg_expression(){}
reg_expression& BOOST_REGEX_CALL operator=(const reg_expression& that)
reg_expression& operator=(const reg_expression& that)
{
return this->assign(that);
}
@ -761,7 +761,7 @@ public:
}
template <class ST, class SA>
reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
reg_expression& operator=(const std::basic_string<charT, ST, SA>& p)
{
this->assign(p);
return *this;
@ -772,7 +772,7 @@ public:
{
}
reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
reg_expression& operator=(const std::basic_string<charT>& p)
{
this->assign(p);
return *this;

View File

@ -98,14 +98,14 @@ struct c_regex_traits<char>
return static_cast<char>((std::tolower)(static_cast<unsigned char>(c)));
}
static string_type BOOST_REGEX_CALL transform(const char* p1, const char* p2);
static string_type BOOST_REGEX_CALL transform_primary(const char* p1, const char* p2);
static string_type transform(const char* p1, const char* p2);
static string_type transform_primary(const char* p1, const char* p2);
static char_class_type BOOST_REGEX_CALL lookup_classname(const char* p1, const char* p2);
static string_type BOOST_REGEX_CALL lookup_collatename(const char* p1, const char* p2);
static char_class_type lookup_classname(const char* p1, const char* p2);
static string_type lookup_collatename(const char* p1, const char* p2);
static bool BOOST_REGEX_CALL isctype(char, char_class_type);
static int BOOST_REGEX_CALL value(char, int);
static bool isctype(char, char_class_type);
static int value(char, int);
locale_type imbue(locale_type l)
{ return l; }
@ -143,14 +143,14 @@ struct c_regex_traits<wchar_t>
return (std::towlower)(c);
}
static string_type BOOST_REGEX_CALL transform(const wchar_t* p1, const wchar_t* p2);
static string_type BOOST_REGEX_CALL transform_primary(const wchar_t* p1, const wchar_t* p2);
static string_type transform(const wchar_t* p1, const wchar_t* p2);
static string_type transform_primary(const wchar_t* p1, const wchar_t* p2);
static char_class_type BOOST_REGEX_CALL lookup_classname(const wchar_t* p1, const wchar_t* p2);
static string_type BOOST_REGEX_CALL lookup_collatename(const wchar_t* p1, const wchar_t* p2);
static char_class_type lookup_classname(const wchar_t* p1, const wchar_t* p2);
static string_type lookup_collatename(const wchar_t* p1, const wchar_t* p2);
static bool BOOST_REGEX_CALL isctype(wchar_t, char_class_type);
static int BOOST_REGEX_CALL value(wchar_t, int);
static bool isctype(wchar_t, char_class_type);
static int value(wchar_t, int);
locale_type imbue(locale_type l)
{ return l; }
@ -165,7 +165,7 @@ private:
#endif // BOOST_NO_WREGEX
inline c_regex_traits<char>::string_type BOOST_REGEX_CALL c_regex_traits<char>::transform(const char* p1, const char* p2)
inline c_regex_traits<char>::string_type c_regex_traits<char>::transform(const char* p1, const char* p2)
{
std::string result(10, ' ');
std::size_t s = result.size();
@ -193,7 +193,7 @@ inline c_regex_traits<char>::string_type BOOST_REGEX_CALL c_regex_traits<char>::
return result;
}
inline c_regex_traits<char>::string_type BOOST_REGEX_CALL c_regex_traits<char>::transform_primary(const char* p1, const char* p2)
inline c_regex_traits<char>::string_type c_regex_traits<char>::transform_primary(const char* p1, const char* p2)
{
static char s_delim;
static const int s_collate_type = ::boost::BOOST_REGEX_DETAIL_NS::find_sort_syntax(static_cast<c_regex_traits<char>*>(0), &s_delim);
@ -240,7 +240,7 @@ inline c_regex_traits<char>::string_type BOOST_REGEX_CALL c_regex_traits<char>::
return result;
}
inline c_regex_traits<char>::char_class_type BOOST_REGEX_CALL c_regex_traits<char>::lookup_classname(const char* p1, const char* p2)
inline c_regex_traits<char>::char_class_type c_regex_traits<char>::lookup_classname(const char* p1, const char* p2)
{
using namespace BOOST_REGEX_DETAIL_NS;
static const char_class_type masks[] =
@ -281,7 +281,7 @@ inline c_regex_traits<char>::char_class_type BOOST_REGEX_CALL c_regex_traits<cha
return masks[idx + 1];
}
inline bool BOOST_REGEX_CALL c_regex_traits<char>::isctype(char c, char_class_type mask)
inline bool c_regex_traits<char>::isctype(char c, char_class_type mask)
{
using namespace BOOST_REGEX_DETAIL_NS;
return
@ -300,7 +300,7 @@ inline bool BOOST_REGEX_CALL c_regex_traits<char>::isctype(char c, char_class_ty
|| ((mask & char_class_horizontal) && (std::isspace)(static_cast<unsigned char>(c)) && !::boost::BOOST_REGEX_DETAIL_NS::is_separator(c) && (c != '\v'));
}
inline c_regex_traits<char>::string_type BOOST_REGEX_CALL c_regex_traits<char>::lookup_collatename(const char* p1, const char* p2)
inline c_regex_traits<char>::string_type c_regex_traits<char>::lookup_collatename(const char* p1, const char* p2)
{
std::string s(p1, p2);
s = ::boost::BOOST_REGEX_DETAIL_NS::lookup_default_collate_name(s);
@ -309,7 +309,7 @@ inline c_regex_traits<char>::string_type BOOST_REGEX_CALL c_regex_traits<char>::
return s;
}
inline int BOOST_REGEX_CALL c_regex_traits<char>::value(char c, int radix)
inline int c_regex_traits<char>::value(char c, int radix)
{
char b[2] = { c, '\0', };
char* ep;
@ -321,7 +321,7 @@ inline int BOOST_REGEX_CALL c_regex_traits<char>::value(char c, int radix)
#ifndef BOOST_NO_WREGEX
inline c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::transform(const wchar_t* p1, const wchar_t* p2)
inline c_regex_traits<wchar_t>::string_type c_regex_traits<wchar_t>::transform(const wchar_t* p1, const wchar_t* p2)
{
std::size_t r;
std::size_t s = 10;
@ -349,7 +349,7 @@ inline c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wcha
return result;
}
inline c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::transform_primary(const wchar_t* p1, const wchar_t* p2)
inline c_regex_traits<wchar_t>::string_type c_regex_traits<wchar_t>::transform_primary(const wchar_t* p1, const wchar_t* p2)
{
static wchar_t s_delim;
static const int s_collate_type = ::boost::BOOST_REGEX_DETAIL_NS::find_sort_syntax(static_cast<const c_regex_traits<wchar_t>*>(0), &s_delim);
@ -396,7 +396,7 @@ inline c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wcha
return result;
}
inline c_regex_traits<wchar_t>::char_class_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::lookup_classname(const wchar_t* p1, const wchar_t* p2)
inline c_regex_traits<wchar_t>::char_class_type c_regex_traits<wchar_t>::lookup_classname(const wchar_t* p1, const wchar_t* p2)
{
using namespace BOOST_REGEX_DETAIL_NS;
static const char_class_type masks[] =
@ -437,7 +437,7 @@ inline c_regex_traits<wchar_t>::char_class_type BOOST_REGEX_CALL c_regex_traits<
return masks[idx + 1];
}
inline bool BOOST_REGEX_CALL c_regex_traits<wchar_t>::isctype(wchar_t c, char_class_type mask)
inline bool c_regex_traits<wchar_t>::isctype(wchar_t c, char_class_type mask)
{
using namespace BOOST_REGEX_DETAIL_NS;
return
@ -457,7 +457,7 @@ inline bool BOOST_REGEX_CALL c_regex_traits<wchar_t>::isctype(wchar_t c, char_cl
|| ((mask & char_class_horizontal) && (std::iswspace)(c) && !::boost::BOOST_REGEX_DETAIL_NS::is_separator(c) && (c != L'\v'));
}
inline c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::lookup_collatename(const wchar_t* p1, const wchar_t* p2)
inline c_regex_traits<wchar_t>::string_type c_regex_traits<wchar_t>::lookup_collatename(const wchar_t* p1, const wchar_t* p2)
{
#ifdef BOOST_MSVC
#pragma warning(push)
@ -475,7 +475,7 @@ inline c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wcha
return string_type();
}
inline int BOOST_REGEX_CALL c_regex_traits<wchar_t>::value(wchar_t c, int radix)
inline int c_regex_traits<wchar_t>::value(wchar_t c, int radix)
{
#ifdef BOOST_BORLANDC
// workaround for broken wcstol:

View File

@ -450,7 +450,7 @@ public:
//
// private access functions:
void BOOST_REGEX_CALL set_second(BidiIterator i)
void set_second(BidiIterator i)
{
BOOST_REGEX_ASSERT(m_subs.size() > 2);
m_subs[2].second = i;
@ -463,7 +463,7 @@ public:
m_is_singular = false;
}
void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false)
void set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false)
{
if(pos)
m_last_closed_paren = static_cast<int>(pos);
@ -481,7 +481,7 @@ public:
m_is_singular = false;
}
}
void BOOST_REGEX_CALL set_size(size_type n, BidiIterator i, BidiIterator j)
void set_size(size_type n, BidiIterator i, BidiIterator j)
{
value_type v(j);
size_type len = m_subs.size();
@ -499,7 +499,7 @@ public:
m_subs[1].first = i;
m_last_closed_paren = 0;
}
void BOOST_REGEX_CALL set_base(BidiIterator pos)
void set_base(BidiIterator pos)
{
m_base = pos;
}
@ -507,7 +507,7 @@ public:
{
return m_base;
}
void BOOST_REGEX_CALL set_first(BidiIterator i)
void set_first(BidiIterator i)
{
BOOST_REGEX_ASSERT(m_subs.size() > 2);
// set up prefix:
@ -522,7 +522,7 @@ public:
m_subs[n].matched = false;
}
}
void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos, bool escape_k = false)
void set_first(BidiIterator i, size_type pos, bool escape_k = false)
{
BOOST_REGEX_ASSERT(pos+2 < m_subs.size());
if(pos || escape_k)
@ -537,9 +537,9 @@ public:
else
set_first(i);
}
void BOOST_REGEX_CALL maybe_assign(const match_results<BidiIterator, Allocator>& m);
void maybe_assign(const match_results<BidiIterator, Allocator>& m);
void BOOST_REGEX_CALL set_named_subs(std::shared_ptr<named_sub_type> subs)
void set_named_subs(std::shared_ptr<named_sub_type> subs)
{
m_named_subs = subs;
}
@ -564,7 +564,7 @@ private:
};
template <class BidiIterator, class Allocator>
void BOOST_REGEX_CALL match_results<BidiIterator, Allocator>::maybe_assign(const match_results<BidiIterator, Allocator>& m)
void match_results<BidiIterator, Allocator>::maybe_assign(const match_results<BidiIterator, Allocator>& m)
{
if(m_is_singular)
{

View File

@ -149,24 +149,24 @@ struct mem_block_cache
#if BOOST_REGEX_MAX_CACHE_BLOCKS == 0
inline void* BOOST_REGEX_CALL get_mem_block()
inline void* get_mem_block()
{
return ::operator new(BOOST_REGEX_BLOCKSIZE);
}
inline void BOOST_REGEX_CALL put_mem_block(void* p)
inline void put_mem_block(void* p)
{
::operator delete(p);
}
#else
inline void* BOOST_REGEX_CALL get_mem_block()
inline void* get_mem_block()
{
return mem_block_cache::instance().get();
}
inline void BOOST_REGEX_CALL put_mem_block(void* p)
inline void put_mem_block(void* p)
{
mem_block_cache::instance().put(p);
}

View File

@ -45,7 +45,7 @@ namespace BOOST_REGEX_DETAIL_NS{
//
// error checking API:
//
inline void BOOST_REGEX_CALL verify_options(boost::regex_constants::syntax_option_type, match_flag_type mf)
inline void verify_options(boost::regex_constants::syntax_option_type, match_flag_type mf)
{
//
// can't mix match_extra with POSIX matching rules:
@ -123,7 +123,7 @@ inline const charT* re_skip_past_null(const charT* p)
}
template <class iterator, class charT, class traits_type, class char_classT>
iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
iterator re_is_set_member(iterator next,
iterator last,
const re_set_long<char_classT>* set_,
const regex_data<charT, traits_type>& e, bool icase)

View File

@ -123,7 +123,7 @@ public:
::operator delete(start);
}
void BOOST_REGEX_CALL resize(size_type n)
void resize(size_type n)
{
size_type newsize = start ? last - start : 1024;
while (newsize < n)
@ -147,7 +147,7 @@ public:
last = ptr + newsize;
}
void* BOOST_REGEX_CALL extend(size_type n)
void* extend(size_type n)
{
if(size_type(last - end) < n)
resize(n + (end - start));
@ -156,7 +156,7 @@ public:
return result;
}
void* BOOST_REGEX_CALL insert(size_type pos, size_type n)
void* insert(size_type pos, size_type n)
{
BOOST_REGEX_ASSERT(pos <= size_type(end - start));
if (size_type(last - end) < n)
@ -167,32 +167,32 @@ public:
return result;
}
size_type BOOST_REGEX_CALL size()
size_type size()
{
return size_type(end - start);
}
size_type BOOST_REGEX_CALL capacity()
size_type capacity()
{
return size_type(last - start);
}
void* BOOST_REGEX_CALL data()const
void* data()const
{
return start;
}
size_type BOOST_REGEX_CALL index(void* ptr)
size_type index(void* ptr)
{
return size_type(static_cast<pointer>(ptr) - static_cast<pointer>(data()));
}
void BOOST_REGEX_CALL clear()
void clear()
{
end = start;
}
void BOOST_REGEX_CALL align()
void align()
{
// move end up to a boundary:
end = start + (((end - start) + padding_mask) & ~padding_mask);

View File

@ -60,7 +60,7 @@ inline bool is_extended(charT c)
inline bool is_extended(char)
{ return false; }
inline const char* BOOST_REGEX_CALL get_default_syntax(regex_constants::syntax_type n)
inline const char* get_default_syntax(regex_constants::syntax_type n)
{
// if the user hasn't supplied a message catalog, then this supplies
// default "messages" for us to load in the range 1-100.
@ -130,7 +130,7 @@ inline const char* BOOST_REGEX_CALL get_default_syntax(regex_constants::syntax_t
return ((n >= (sizeof(messages) / sizeof(messages[1]))) ? "" : messages[n]);
}
inline const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n)
inline const char* get_default_error_string(regex_constants::error_type n)
{
static const char* const s_default_error_messages[] = {
"Success", /* REG_NOERROR 0 error_ok */
@ -163,7 +163,7 @@ inline const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::er
return (n > ::boost::regex_constants::error_unknown) ? s_default_error_messages[::boost::regex_constants::error_unknown] : s_default_error_messages[n];
}
inline regex_constants::syntax_type BOOST_REGEX_CALL get_default_syntax_type(char c)
inline regex_constants::syntax_type get_default_syntax_type(char c)
{
//
// char_syntax determines how the compiler treats a given character
@ -358,7 +358,7 @@ inline regex_constants::syntax_type BOOST_REGEX_CALL get_default_syntax_type(cha
return char_syntax[(unsigned char)c];
}
inline regex_constants::escape_syntax_type BOOST_REGEX_CALL get_default_escape_syntax_type(char c)
inline regex_constants::escape_syntax_type get_default_escape_syntax_type(char c)
{
//
// char_syntax determines how the compiler treats a given character
@ -554,7 +554,7 @@ inline regex_constants::escape_syntax_type BOOST_REGEX_CALL get_default_escape_s
}
// is charT c a combining character?
inline bool BOOST_REGEX_CALL is_combining_implementation(std::uint_least16_t c)
inline bool is_combining_implementation(std::uint_least16_t c)
{
const std::uint_least16_t combining_ranges[] = { 0x0300, 0x0361,
0x0483, 0x0486,
@ -668,7 +668,7 @@ inline bool is_separator<char>(char c)
//
// get a default collating element:
//
inline std::string BOOST_REGEX_CALL lookup_default_collate_name(const std::string& name)
inline std::string lookup_default_collate_name(const std::string& name)
{
//
// these are the POSIX collating names:
@ -845,32 +845,32 @@ inline std::ptrdiff_t global_length<wchar_t>(const wchar_t* p)
}
#endif
template <class charT>
inline charT BOOST_REGEX_CALL global_lower(charT c)
inline charT global_lower(charT c)
{
return c;
}
template <class charT>
inline charT BOOST_REGEX_CALL global_upper(charT c)
inline charT global_upper(charT c)
{
return c;
}
inline char BOOST_REGEX_CALL do_global_lower(char c)
inline char do_global_lower(char c)
{
return static_cast<char>((std::tolower)((unsigned char)c));
}
inline char BOOST_REGEX_CALL do_global_upper(char c)
inline char do_global_upper(char c)
{
return static_cast<char>((std::toupper)((unsigned char)c));
}
#ifndef BOOST_NO_WREGEX
inline wchar_t BOOST_REGEX_CALL do_global_lower(wchar_t c)
inline wchar_t do_global_lower(wchar_t c)
{
return (std::towlower)(c);
}
inline wchar_t BOOST_REGEX_CALL do_global_upper(wchar_t c)
inline wchar_t do_global_upper(wchar_t c)
{
return (std::towupper)(c);
}
@ -885,11 +885,11 @@ inline wchar_t BOOST_REGEX_CALL do_global_upper(wchar_t c)
// otherwise the "local template instantiation" compiler option can pick
// the wrong instantiation when linking:
//
template<> inline char BOOST_REGEX_CALL global_lower<char>(char c) { return do_global_lower(c); }
template<> inline char BOOST_REGEX_CALL global_upper<char>(char c) { return do_global_upper(c); }
template<> inline char global_lower<char>(char c) { return do_global_lower(c); }
template<> inline char global_upper<char>(char c) { return do_global_upper(c); }
#ifndef BOOST_NO_WREGEX
template<> inline wchar_t BOOST_REGEX_CALL global_lower<wchar_t>(wchar_t c) { return do_global_lower(c); }
template<> inline wchar_t BOOST_REGEX_CALL global_upper<wchar_t>(wchar_t c) { return do_global_upper(c); }
template<> inline wchar_t global_lower<wchar_t>(wchar_t c) { return do_global_lower(c); }
template<> inline wchar_t global_upper<wchar_t>(wchar_t c) { return do_global_upper(c); }
#endif
template <class charT>

View File

@ -296,7 +296,7 @@ template<class charT, class traits>
struct regex_data;
template <class iterator, class charT, class traits_type, class char_classT>
iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
iterator re_is_set_member(iterator next,
iterator last,
const re_set_long<char_classT>* set_,
const regex_data<charT, traits_type>& e, bool icase);

View File

@ -50,7 +50,7 @@ struct sub_match : public std::pair<BidiIterator, BidiIterator>
{
return matched ? std::basic_string<value_type, T, A>(this->first, this->second) : std::basic_string<value_type, T, A>();
}
difference_type BOOST_REGEX_CALL length()const
difference_type length()const
{
difference_type n = matched ? std::distance((BidiIterator)this->first, (BidiIterator)this->second) : 0;
return n;
@ -88,7 +88,7 @@ struct sub_match : public std::pair<BidiIterator, BidiIterator>
bool operator==(const sub_match& that)const
{ return compare(that) == 0; }
bool BOOST_REGEX_CALL operator !=(const sub_match& that)const
bool operator !=(const sub_match& that)const
{ return compare(that) != 0; }
bool operator<(const sub_match& that)const
{ return compare(that) < 0; }

View File

@ -73,35 +73,35 @@ typedef ::std::shared_ptr<void> cat_type; // placeholder for dll HANDLE.
//
// then add wrappers around the actual Win32 API's (ie implementation hiding):
//
lcid_type BOOST_REGEX_CALL w32_get_default_locale();
bool BOOST_REGEX_CALL w32_is_lower(char, lcid_type);
lcid_type w32_get_default_locale();
bool w32_is_lower(char, lcid_type);
#ifndef BOOST_NO_WREGEX
bool BOOST_REGEX_CALL w32_is_lower(wchar_t, lcid_type);
bool w32_is_lower(wchar_t, lcid_type);
#endif
bool BOOST_REGEX_CALL w32_is_upper(char, lcid_type);
bool w32_is_upper(char, lcid_type);
#ifndef BOOST_NO_WREGEX
bool BOOST_REGEX_CALL w32_is_upper(wchar_t, lcid_type);
bool w32_is_upper(wchar_t, lcid_type);
#endif
cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name);
std::string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::string& def);
cat_type w32_cat_open(const std::string& name);
std::string w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::string& def);
#ifndef BOOST_NO_WREGEX
std::wstring BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::wstring& def);
std::wstring w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::wstring& def);
#endif
std::string BOOST_REGEX_CALL w32_transform(lcid_type state_id, const char* p1, const char* p2);
std::string w32_transform(lcid_type state_id, const char* p1, const char* p2);
#ifndef BOOST_NO_WREGEX
std::wstring BOOST_REGEX_CALL w32_transform(lcid_type state_id, const wchar_t* p1, const wchar_t* p2);
std::wstring w32_transform(lcid_type state_id, const wchar_t* p1, const wchar_t* p2);
#endif
char BOOST_REGEX_CALL w32_tolower(char c, lcid_type);
char w32_tolower(char c, lcid_type);
#ifndef BOOST_NO_WREGEX
wchar_t BOOST_REGEX_CALL w32_tolower(wchar_t c, lcid_type);
wchar_t w32_tolower(wchar_t c, lcid_type);
#endif
char BOOST_REGEX_CALL w32_toupper(char c, lcid_type);
char w32_toupper(char c, lcid_type);
#ifndef BOOST_NO_WREGEX
wchar_t BOOST_REGEX_CALL w32_toupper(wchar_t c, lcid_type);
wchar_t w32_toupper(wchar_t c, lcid_type);
#endif
bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, char c);
bool w32_is(lcid_type, boost::uint32_t mask, char c);
#ifndef BOOST_NO_WREGEX
bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, wchar_t c);
bool w32_is(lcid_type, boost::uint32_t mask, wchar_t c);
#endif
//
// class w32_regex_traits_base:
@ -793,12 +793,12 @@ namespace BOOST_REGEX_DETAIL_NS {
BOOST_REGEX_ASSERT(0 != r);
}
inline lcid_type BOOST_REGEX_CALL w32_get_default_locale()
inline lcid_type w32_get_default_locale()
{
return ::GetUserDefaultLCID();
}
inline bool BOOST_REGEX_CALL w32_is_lower(char c, lcid_type idx)
inline bool w32_is_lower(char c, lcid_type idx)
{
#ifndef BOOST_NO_ANSI_APIS
WORD mask;
@ -821,7 +821,7 @@ namespace BOOST_REGEX_DETAIL_NS {
#endif
}
inline bool BOOST_REGEX_CALL w32_is_lower(wchar_t c, lcid_type idx)
inline bool w32_is_lower(wchar_t c, lcid_type idx)
{
WORD mask;
if (::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_LOWER))
@ -829,7 +829,7 @@ namespace BOOST_REGEX_DETAIL_NS {
return false;
}
inline bool BOOST_REGEX_CALL w32_is_upper(char c, lcid_type idx)
inline bool w32_is_upper(char c, lcid_type idx)
{
#ifndef BOOST_NO_ANSI_APIS
WORD mask;
@ -852,7 +852,7 @@ namespace BOOST_REGEX_DETAIL_NS {
#endif
}
inline bool BOOST_REGEX_CALL w32_is_upper(wchar_t c, lcid_type idx)
inline bool w32_is_upper(wchar_t c, lcid_type idx)
{
WORD mask;
if (::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & C1_UPPER))
@ -865,7 +865,7 @@ namespace BOOST_REGEX_DETAIL_NS {
::FreeLibrary(static_cast<HMODULE>(mod));
}
inline cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name)
inline cat_type w32_cat_open(const std::string& name)
{
#ifndef BOOST_NO_ANSI_APIS
cat_type result(::LoadLibraryA(name.c_str()), &free_module);
@ -880,7 +880,7 @@ namespace BOOST_REGEX_DETAIL_NS {
#endif
}
inline std::string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type, int i, const std::string& def)
inline std::string w32_cat_get(const cat_type& cat, lcid_type, int i, const std::string& def)
{
#ifndef BOOST_NO_ANSI_APIS
char buf[256];
@ -914,7 +914,7 @@ namespace BOOST_REGEX_DETAIL_NS {
}
#ifndef BOOST_NO_WREGEX
inline std::wstring BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type, int i, const std::wstring& def)
inline std::wstring w32_cat_get(const cat_type& cat, lcid_type, int i, const std::wstring& def)
{
wchar_t buf[256];
if (0 == ::LoadStringW(
@ -929,7 +929,7 @@ namespace BOOST_REGEX_DETAIL_NS {
return std::wstring(buf);
}
#endif
inline std::string BOOST_REGEX_CALL w32_transform(lcid_type idx, const char* p1, const char* p2)
inline std::string w32_transform(lcid_type idx, const char* p1, const char* p2)
{
#ifndef BOOST_NO_ANSI_APIS
int bytes = ::LCMapStringA(
@ -991,7 +991,7 @@ namespace BOOST_REGEX_DETAIL_NS {
}
#ifndef BOOST_NO_WREGEX
inline std::wstring BOOST_REGEX_CALL w32_transform(lcid_type idx, const wchar_t* p1, const wchar_t* p2)
inline std::wstring w32_transform(lcid_type idx, const wchar_t* p1, const wchar_t* p2)
{
int bytes = ::LCMapStringW(
idx, // locale identifier
@ -1024,7 +1024,7 @@ namespace BOOST_REGEX_DETAIL_NS {
return r2;
}
#endif
inline char BOOST_REGEX_CALL w32_tolower(char c, lcid_type idx)
inline char w32_tolower(char c, lcid_type idx)
{
char result[2];
#ifndef BOOST_NO_ANSI_APIS
@ -1064,7 +1064,7 @@ namespace BOOST_REGEX_DETAIL_NS {
}
#ifndef BOOST_NO_WREGEX
inline wchar_t BOOST_REGEX_CALL w32_tolower(wchar_t c, lcid_type idx)
inline wchar_t w32_tolower(wchar_t c, lcid_type idx)
{
wchar_t result[2];
int b = ::LCMapStringW(
@ -1079,7 +1079,7 @@ namespace BOOST_REGEX_DETAIL_NS {
return result[0];
}
#endif
inline char BOOST_REGEX_CALL w32_toupper(char c, lcid_type idx)
inline char w32_toupper(char c, lcid_type idx)
{
char result[2];
#ifndef BOOST_NO_ANSI_APIS
@ -1119,7 +1119,7 @@ namespace BOOST_REGEX_DETAIL_NS {
}
#ifndef BOOST_NO_WREGEX
inline wchar_t BOOST_REGEX_CALL w32_toupper(wchar_t c, lcid_type idx)
inline wchar_t w32_toupper(wchar_t c, lcid_type idx)
{
wchar_t result[2];
int b = ::LCMapStringW(
@ -1134,7 +1134,7 @@ namespace BOOST_REGEX_DETAIL_NS {
return result[0];
}
#endif
inline bool BOOST_REGEX_CALL w32_is(lcid_type idx, boost::uint32_t m, char c)
inline bool w32_is(lcid_type idx, boost::uint32_t m, char c)
{
WORD mask;
#ifndef BOOST_NO_ANSI_APIS
@ -1158,7 +1158,7 @@ namespace BOOST_REGEX_DETAIL_NS {
}
#ifndef BOOST_NO_WREGEX
inline bool BOOST_REGEX_CALL w32_is(lcid_type idx, boost::uint32_t m, wchar_t c)
inline bool w32_is(lcid_type idx, boost::uint32_t m, wchar_t c)
{
WORD mask;
if (::GetStringTypeExW(idx, CT_CTYPE1, &c, 1, &mask) && (mask & m & w32_regex_traits_implementation<wchar_t>::mask_base))