mirror of
https://github.com/boostorg/regex.git
synced 2025-07-15 05:16:37 +02:00
Suppress msvc warnings.
Fixes: https://github.com/boostorg/regex/issues/80
This commit is contained in:
@ -43,13 +43,16 @@ namespace boost{
|
|||||||
#ifdef BOOST_MSVC
|
#ifdef BOOST_MSVC
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable : 4275)
|
#pragma warning(disable : 4275)
|
||||||
|
#if BOOST_MSVC >= 1800
|
||||||
|
#pragma warning(disable : 26812)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
class BOOST_REGEX_DECL regex_error : public std::runtime_error
|
class BOOST_REGEX_DECL regex_error : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0);
|
explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0);
|
||||||
explicit regex_error(regex_constants::error_type err);
|
explicit regex_error(regex_constants::error_type err);
|
||||||
~regex_error() throw();
|
~regex_error() BOOST_NOEXCEPT;
|
||||||
regex_constants::error_type code()const
|
regex_constants::error_type code()const
|
||||||
{ return m_error_code; }
|
{ return m_error_code; }
|
||||||
std::ptrdiff_t position()const
|
std::ptrdiff_t position()const
|
||||||
|
@ -57,6 +57,10 @@ private:
|
|||||||
friend struct data;
|
friend struct data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4702)
|
||||||
|
#endif
|
||||||
template <class Key, class Object>
|
template <class Key, class Object>
|
||||||
boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, size_type l_max_cache_size)
|
boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, size_type l_max_cache_size)
|
||||||
{
|
{
|
||||||
@ -80,6 +84,9 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, siz
|
|||||||
return do_get(k, l_max_cache_size);
|
return do_get(k, l_max_cache_size);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class Key, class Object>
|
template <class Key, class Object>
|
||||||
boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, size_type l_max_cache_size)
|
boost::shared_ptr<Object const> object_cache<Key, Object>::do_get(const Key& k, size_type l_max_cache_size)
|
||||||
|
@ -170,9 +170,19 @@ struct regex_data : public named_subexpressions
|
|||||||
|
|
||||||
regex_data(const ::boost::shared_ptr<
|
regex_data(const ::boost::shared_ptr<
|
||||||
::boost::regex_traits_wrapper<traits> >& t)
|
::boost::regex_traits_wrapper<traits> >& t)
|
||||||
: m_ptraits(t), m_expression(0), m_expression_len(0), m_disable_match_any(false) {}
|
: m_ptraits(t), m_flags(0), m_status(0), m_expression(0), m_expression_len(0),
|
||||||
|
m_mark_count(0), m_first_state(0), m_restart_type(0),
|
||||||
|
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !(defined(BOOST_MSVC) && (BOOST_MSVC < 1900))
|
||||||
|
m_startmap{ 0 },
|
||||||
|
#endif
|
||||||
|
m_can_be_null(0), m_word_mask(0), m_has_recursions(false), m_disable_match_any(false) {}
|
||||||
regex_data()
|
regex_data()
|
||||||
: m_ptraits(new ::boost::regex_traits_wrapper<traits>()), m_expression(0), m_expression_len(0), m_disable_match_any(false) {}
|
: m_ptraits(new ::boost::regex_traits_wrapper<traits>()), m_flags(0), m_status(0), m_expression(0), m_expression_len(0),
|
||||||
|
m_mark_count(0), m_first_state(0), m_restart_type(0),
|
||||||
|
#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !(defined(BOOST_MSVC) && (BOOST_MSVC < 1900))
|
||||||
|
m_startmap{ 0 },
|
||||||
|
#endif
|
||||||
|
m_can_be_null(0), m_word_mask(0), m_has_recursions(false), m_disable_match_any(false) {}
|
||||||
|
|
||||||
::boost::shared_ptr<
|
::boost::shared_ptr<
|
||||||
::boost::regex_traits_wrapper<traits>
|
::boost::regex_traits_wrapper<traits>
|
||||||
|
@ -267,7 +267,8 @@ private:
|
|||||||
|
|
||||||
template <class charT, class traits>
|
template <class charT, class traits>
|
||||||
basic_regex_creator<charT, traits>::basic_regex_creator(regex_data<charT, traits>* data)
|
basic_regex_creator<charT, traits>::basic_regex_creator(regex_data<charT, traits>* data)
|
||||||
: m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0), m_has_recursions(false)
|
: m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_icase(false), m_repeater_id(0),
|
||||||
|
m_has_backrefs(false), m_backrefs(0), m_bad_repeats(0), m_has_recursions(false), m_word_mask(0), m_mask_space(0), m_lower_mask(0), m_upper_mask(0), m_alpha_mask(0)
|
||||||
{
|
{
|
||||||
m_pdata->m_data.clear();
|
m_pdata->m_data.clear();
|
||||||
m_pdata->m_status = ::boost::regex_constants::error_ok;
|
m_pdata->m_status = ::boost::regex_constants::error_ok;
|
||||||
@ -1512,6 +1513,10 @@ void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* st
|
|||||||
state = state->next.p;
|
state = state->next.p;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#pragma warning(disable:6011)
|
||||||
|
#endif
|
||||||
if((static_cast<re_brace*>(state)->index == -1)
|
if((static_cast<re_brace*>(state)->index == -1)
|
||||||
|| (static_cast<re_brace*>(state)->index == -2))
|
|| (static_cast<re_brace*>(state)->index == -2))
|
||||||
{
|
{
|
||||||
@ -1519,6 +1524,9 @@ void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* st
|
|||||||
state = static_cast<const re_jump*>(state->next.p)->alt.p->next.p;
|
state = static_cast<const re_jump*>(state->next.p)->alt.p->next.p;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
if(static_cast<re_brace*>(state)->index == -3)
|
if(static_cast<re_brace*>(state)->index == -3)
|
||||||
{
|
{
|
||||||
// Have to skip the leading jump state:
|
// Have to skip the leading jump state:
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#ifdef BOOST_MSVC
|
#ifdef BOOST_MSVC
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable: 4103)
|
#pragma warning(disable: 4103)
|
||||||
|
#if BOOST_MSVC >= 1800
|
||||||
|
#pragma warning(disable: 26812)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef BOOST_HAS_ABI_HEADERS
|
#ifdef BOOST_HAS_ABI_HEADERS
|
||||||
# include BOOST_ABI_PREFIX
|
# include BOOST_ABI_PREFIX
|
||||||
@ -124,7 +127,8 @@ private:
|
|||||||
|
|
||||||
template <class charT, class traits>
|
template <class charT, class traits>
|
||||||
basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>* data)
|
basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>* data)
|
||||||
: basic_regex_creator<charT, traits>(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false), m_recursion_count(0)
|
: basic_regex_creator<charT, traits>(data), m_parser_proc(), m_base(0), m_end(0), m_position(0),
|
||||||
|
m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false), m_recursion_count(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,6 +325,12 @@ bool basic_regex_parser<charT, traits>::parse_basic()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#if BOOST_MSVC >= 1800
|
||||||
|
#pragma warning(disable:26812)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
template <class charT, class traits>
|
template <class charT, class traits>
|
||||||
bool basic_regex_parser<charT, traits>::parse_extended()
|
bool basic_regex_parser<charT, traits>::parse_extended()
|
||||||
{
|
{
|
||||||
@ -409,6 +419,9 @@ bool basic_regex_parser<charT, traits>::parse_extended()
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#ifdef BOOST_MSVC
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -911,8 +924,8 @@ escape_type_class_jump:
|
|||||||
pc = m_position;
|
pc = m_position;
|
||||||
}
|
}
|
||||||
if(negative)
|
if(negative)
|
||||||
i = 1 + m_mark_count - i;
|
i = 1 + (static_cast<boost::intmax_t>(m_mark_count) - i);
|
||||||
if(((i > 0) && (i < std::numeric_limits<unsigned>::digits) && (i - 1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (i-1)))) || ((i > 10000) && (this->m_pdata->get_id(i) > 0) && (this->m_pdata->get_id(i)-1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (this->m_pdata->get_id(i)-1)))))
|
if(((i > 0) && (i < std::numeric_limits<unsigned>::digits) && (i - 1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (i-1)))) || ((i > 10000) && (this->m_pdata->get_id(i) > 0) && (static_cast<boost::intmax_t>(this->m_pdata->get_id(i))-1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (this->m_pdata->get_id(i)-1)))))
|
||||||
{
|
{
|
||||||
m_position = pc;
|
m_position = pc;
|
||||||
re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
|
re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
|
||||||
@ -2132,7 +2145,7 @@ insert_recursion:
|
|||||||
// Oops not a relative recursion at all, but a (?-imsx) group:
|
// Oops not a relative recursion at all, but a (?-imsx) group:
|
||||||
goto option_group_jump;
|
goto option_group_jump;
|
||||||
}
|
}
|
||||||
v = m_mark_count + 1 - v;
|
v = static_cast<boost::intmax_t>(m_mark_count) + 1 - v;
|
||||||
if(v <= 0)
|
if(v <= 0)
|
||||||
{
|
{
|
||||||
// Rewind to start of (? sequence:
|
// Rewind to start of (? sequence:
|
||||||
@ -2747,6 +2760,12 @@ bool basic_regex_parser<charT, traits>::match_verb(const char* verb)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#if BOOST_MSVC >= 1800
|
||||||
|
#pragma warning(disable:26812)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
template <class charT, class traits>
|
template <class charT, class traits>
|
||||||
bool basic_regex_parser<charT, traits>::parse_perl_verb()
|
bool basic_regex_parser<charT, traits>::parse_perl_verb()
|
||||||
{
|
{
|
||||||
@ -2915,6 +2934,9 @@ bool basic_regex_parser<charT, traits>::parse_perl_verb()
|
|||||||
fail(regex_constants::error_perl_extension, m_position - m_base);
|
fail(regex_constants::error_perl_extension, m_position - m_base);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class charT, class traits>
|
template <class charT, class traits>
|
||||||
bool basic_regex_parser<charT, traits>::add_emacs_code(bool negate)
|
bool basic_regex_parser<charT, traits>::add_emacs_code(bool negate)
|
||||||
|
@ -174,7 +174,7 @@ template <class charT>
|
|||||||
struct cpp_regex_traits_base
|
struct cpp_regex_traits_base
|
||||||
{
|
{
|
||||||
cpp_regex_traits_base(const std::locale& l)
|
cpp_regex_traits_base(const std::locale& l)
|
||||||
{ imbue(l); }
|
{ (void)imbue(l); }
|
||||||
std::locale imbue(const std::locale& l);
|
std::locale imbue(const std::locale& l);
|
||||||
|
|
||||||
std::locale m_locale;
|
std::locale m_locale;
|
||||||
|
@ -28,6 +28,13 @@ namespace boost{
|
|||||||
namespace regex_constants{
|
namespace regex_constants{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(push)
|
||||||
|
#if BOOST_MSVC >= 1800
|
||||||
|
#pragma warning(disable : 26812)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum _match_flags
|
typedef enum _match_flags
|
||||||
{
|
{
|
||||||
match_default = 0,
|
match_default = 0,
|
||||||
@ -143,6 +150,11 @@ using regex_constants::format_no_copy;
|
|||||||
using regex_constants::format_first_only;
|
using regex_constants::format_first_only;
|
||||||
/*using regex_constants::format_is_if;*/
|
/*using regex_constants::format_is_if;*/
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
} /* namespace boost */
|
} /* namespace boost */
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
#endif /* include guard */
|
#endif /* include guard */
|
||||||
|
@ -95,7 +95,7 @@ public:
|
|||||||
// See https://svn.boost.org/trac/boost/ticket/3632.
|
// See https://svn.boost.org/trac/boost/ticket/3632.
|
||||||
//
|
//
|
||||||
match_results(const match_results& m)
|
match_results(const match_results& m)
|
||||||
: m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular)
|
: m_subs(m.m_subs), m_base(), m_null(), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular)
|
||||||
{
|
{
|
||||||
if(!m_is_singular)
|
if(!m_is_singular)
|
||||||
{
|
{
|
||||||
|
@ -341,6 +341,12 @@ enum saved_state_type
|
|||||||
saved_state_count = 14
|
saved_state_count = 14
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#if BOOST_MSVC >= 1800
|
||||||
|
#pragma warning(disable:26495)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
template <class Results>
|
template <class Results>
|
||||||
struct recursion_info
|
struct recursion_info
|
||||||
{
|
{
|
||||||
@ -352,6 +358,9 @@ struct recursion_info
|
|||||||
repeater_count<iterator>* repeater_stack;
|
repeater_count<iterator>* repeater_stack;
|
||||||
iterator location_of_start;
|
iterator location_of_start;
|
||||||
};
|
};
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BOOST_MSVC
|
#ifdef BOOST_MSVC
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
@ -578,6 +587,12 @@ private:
|
|||||||
unsigned m_recursions;
|
unsigned m_recursions;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#if BOOST_MSVC >= 1800
|
||||||
|
#pragma warning(disable:26495)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
// these operations aren't allowed, so are declared private,
|
// these operations aren't allowed, so are declared private,
|
||||||
// bodies are provided to keep explicit-instantiation requests happy:
|
// bodies are provided to keep explicit-instantiation requests happy:
|
||||||
perl_matcher& operator=(const perl_matcher&)
|
perl_matcher& operator=(const perl_matcher&)
|
||||||
@ -587,9 +602,8 @@ private:
|
|||||||
perl_matcher(const perl_matcher& that)
|
perl_matcher(const perl_matcher& that)
|
||||||
: m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {}
|
: m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef BOOST_MSVC
|
#ifdef BOOST_MSVC
|
||||||
#pragma warning(pop)
|
# pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace BOOST_REGEX_DETAIL_NS
|
} // namespace BOOST_REGEX_DETAIL_NS
|
||||||
@ -607,6 +621,9 @@ private:
|
|||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
#ifdef BOOST_MSVC
|
#ifdef BOOST_MSVC
|
||||||
# pragma warning(pop)
|
# pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
#ifdef BOOST_MSVC
|
#ifdef BOOST_MSVC
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable: 4103)
|
#pragma warning(disable: 4103)
|
||||||
|
#if BOOST_MSVC >= 1800
|
||||||
|
#pragma warning(disable: 26812)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef BOOST_HAS_ABI_HEADERS
|
#ifdef BOOST_HAS_ABI_HEADERS
|
||||||
# include BOOST_ABI_PREFIX
|
# include BOOST_ABI_PREFIX
|
||||||
@ -44,7 +47,11 @@
|
|||||||
namespace boost{
|
namespace boost{
|
||||||
namespace BOOST_REGEX_DETAIL_NS{
|
namespace BOOST_REGEX_DETAIL_NS{
|
||||||
|
|
||||||
template <class BidiIterator, class Allocator, class traits>
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#pragma warning(disable:26812)
|
||||||
|
#endif
|
||||||
|
template <class BidiIterator, class Allocator, class traits>
|
||||||
void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_regex<char_type, traits>& e, match_flag_type f)
|
void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_regex<char_type, traits>& e, match_flag_type f)
|
||||||
{
|
{
|
||||||
typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;
|
typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;
|
||||||
@ -94,6 +101,9 @@ void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_r
|
|||||||
if(e.get_data().m_disable_match_any)
|
if(e.get_data().m_disable_match_any)
|
||||||
m_match_flags &= regex_constants::match_not_any;
|
m_match_flags &= regex_constants::match_not_any;
|
||||||
}
|
}
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class BidiIterator, class Allocator, class traits>
|
template <class BidiIterator, class Allocator, class traits>
|
||||||
void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(std::random_access_iterator_tag*)
|
void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(std::random_access_iterator_tag*)
|
||||||
|
@ -90,6 +90,10 @@ struct trivial_format_traits
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#pragma warning(disable:26812)
|
||||||
|
#endif
|
||||||
template <class OutputIterator, class Results, class traits, class ForwardIter>
|
template <class OutputIterator, class Results, class traits, class ForwardIter>
|
||||||
class basic_regex_formatter
|
class basic_regex_formatter
|
||||||
{
|
{
|
||||||
@ -203,6 +207,9 @@ private:
|
|||||||
basic_regex_formatter(const basic_regex_formatter&);
|
basic_regex_formatter(const basic_regex_formatter&);
|
||||||
basic_regex_formatter& operator=(const basic_regex_formatter&);
|
basic_regex_formatter& operator=(const basic_regex_formatter&);
|
||||||
};
|
};
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
template <class OutputIterator, class Results, class traits, class ForwardIter>
|
template <class OutputIterator, class Results, class traits, class ForwardIter>
|
||||||
OutputIterator basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format(ForwardIter p1, ForwardIter p2, match_flag_type f)
|
OutputIterator basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format(ForwardIter p1, ForwardIter p2, match_flag_type f)
|
||||||
|
@ -67,16 +67,16 @@ class regex_token_iterator_implementation
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f)
|
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f)
|
||||||
: end(last), re(*p), flags(f){ subs.push_back(sub); }
|
: end(last), re(*p), flags(f), N(0){ subs.push_back(sub); }
|
||||||
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)
|
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)
|
||||||
: end(last), re(*p), flags(f), subs(v){}
|
: end(last), re(*p), flags(f), N(0), subs(v){}
|
||||||
#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
|
#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
|
||||||
#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
|
#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
|
||||||
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
|
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
|
||||||
|| BOOST_WORKAROUND(__HP_aCC, < 60700)
|
|| BOOST_WORKAROUND(__HP_aCC, < 60700)
|
||||||
template <class T>
|
template <class T>
|
||||||
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const T& submatches, match_flag_type f)
|
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const T& submatches, match_flag_type f)
|
||||||
: end(last), re(*p), flags(f)
|
: end(last), re(*p), flags(f), N(0)
|
||||||
{
|
{
|
||||||
// assert that T really is an array:
|
// assert that T really is an array:
|
||||||
BOOST_STATIC_ASSERT(::boost::is_array<T>::value);
|
BOOST_STATIC_ASSERT(::boost::is_array<T>::value);
|
||||||
@ -89,7 +89,7 @@ public:
|
|||||||
#else
|
#else
|
||||||
template <std::size_t CN>
|
template <std::size_t CN>
|
||||||
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f)
|
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f)
|
||||||
: end(last), re(*p), flags(f)
|
: end(last), re(*p), flags(f), N(0)
|
||||||
{
|
{
|
||||||
for(std::size_t i = 0; i < CN; ++i)
|
for(std::size_t i = 0; i < CN; ++i)
|
||||||
{
|
{
|
||||||
|
@ -70,6 +70,10 @@ inline std::string to_string(const char* i, const char* j)
|
|||||||
}
|
}
|
||||||
namespace BOOST_REGEX_DETAIL_NS{
|
namespace BOOST_REGEX_DETAIL_NS{
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#pragma warning(disable:26812)
|
||||||
|
#endif
|
||||||
class RegExData
|
class RegExData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -103,6 +107,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
strings(), positions() {}
|
strings(), positions() {}
|
||||||
};
|
};
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
void RegExData::update()
|
void RegExData::update()
|
||||||
{
|
{
|
||||||
|
@ -112,17 +112,22 @@ void mapfile::open(const char* file)
|
|||||||
std::runtime_error err("Unable to create file mapping.");
|
std::runtime_error err("Unable to create file mapping.");
|
||||||
boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
|
boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
_first = static_cast<const char*>(MapViewOfFile(hmap, FILE_MAP_READ, 0, 0, 0));
|
_first = static_cast<const char*>(MapViewOfFile(hmap, FILE_MAP_READ, 0, 0, 0));
|
||||||
if(_first == 0)
|
if (_first == 0)
|
||||||
{
|
{
|
||||||
CloseHandle(hmap);
|
CloseHandle(hmap);
|
||||||
CloseHandle(hfile);
|
CloseHandle(hfile);
|
||||||
hmap = 0;
|
hmap = 0;
|
||||||
hfile = 0;
|
hfile = 0;
|
||||||
std::runtime_error err("Unable to create file mapping.");
|
std::runtime_error err("Unable to create file mapping.");
|
||||||
|
boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
_last = _first + GetFileSize(hfile, 0);
|
_last = _first + GetFileSize(hfile, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hfile = 0;
|
hfile = 0;
|
||||||
|
@ -66,6 +66,10 @@ const char* names[] = {
|
|||||||
|
|
||||||
typedef boost::basic_regex<char, c_regex_traits<char> > c_regex_type;
|
typedef boost::basic_regex<char, c_regex_traits<char> > c_regex_type;
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#pragma warning(disable:26812)
|
||||||
|
#endif
|
||||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char* ptr, int f)
|
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char* ptr, int f)
|
||||||
{
|
{
|
||||||
#ifndef BOOST_NO_EXCEPTIONS
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
@ -140,6 +144,9 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA* e, char* buf, regsize_t buf_size)
|
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA* e, char* buf, regsize_t buf_size)
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,7 @@ regex_error::regex_error(regex_constants::error_type err)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
regex_error::~regex_error() throw()
|
regex_error::~regex_error() BOOST_NOEXCEPT
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,10 @@ const wchar_t* wnames[] = {
|
|||||||
|
|
||||||
typedef boost::basic_regex<wchar_t, c_regex_traits<wchar_t> > wc_regex_type;
|
typedef boost::basic_regex<wchar_t, c_regex_traits<wchar_t> > wc_regex_type;
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(push)
|
||||||
|
#pragma warning(disable:26812)
|
||||||
|
#endif
|
||||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wchar_t* ptr, int f)
|
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wchar_t* ptr, int f)
|
||||||
{
|
{
|
||||||
#ifndef BOOST_NO_EXCEPTIONS
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
@ -150,6 +154,9 @@ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wcha
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
# pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW* e, wchar_t* buf, regsize_t buf_size)
|
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW* e, wchar_t* buf, regsize_t buf_size)
|
||||||
{
|
{
|
||||||
|
@ -112,7 +112,7 @@ private:
|
|||||||
boost::call_once(f,&init_data);
|
boost::call_once(f,&init_data);
|
||||||
return do_get_data();
|
return do_get_data();
|
||||||
#else
|
#else
|
||||||
static data_type d;
|
static data_type d = {};
|
||||||
return d;
|
return d;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ void do_test(const charT& c, const tagT& tag)
|
|||||||
boost::call_once(f, proc);
|
boost::call_once(f, proc);
|
||||||
#endif
|
#endif
|
||||||
if(test_locale::cpp_locale_state() == test_locale::test_with_locale)
|
if(test_locale::cpp_locale_state() == test_locale::test_with_locale)
|
||||||
e1.imbue(test_locale::cpp_locale());
|
(void)e1.imbue(test_locale::cpp_locale());
|
||||||
if(test_locale::cpp_locale_state() != test_locale::no_test)
|
if(test_locale::cpp_locale_state() != test_locale::no_test)
|
||||||
test(e1, tag);
|
test(e1, tag);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user