diff --git a/include/boost/regex/v5/basic_regex.hpp b/include/boost/regex/v5/basic_regex.hpp index 18ad5b86..5c73775f 100644 --- a/include/boost/regex/v5/basic_regex.hpp +++ b/include/boost/regex/v5/basic_regex.hpp @@ -166,16 +166,12 @@ struct regex_data : public named_subexpressions ::boost::regex_traits_wrapper >& t) : 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_REGEX_MSVC) && (BOOST_REGEX_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() : m_ptraits(new ::boost::regex_traits_wrapper()), 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_REGEX_MSVC) && (BOOST_REGEX_MSVC < 1900)) m_startmap{ 0 }, -#endif m_can_be_null(0), m_word_mask(0), m_has_recursions(false), m_disable_match_any(false) {} ::std::shared_ptr< @@ -390,7 +386,6 @@ public: { return do_assign(p1, p2, f); } -#if !defined(BOOST_NO_MEMBER_TEMPLATES) template unsigned int set_expression(const std::basic_string& p, flag_type f = regex_constants::normal) @@ -444,30 +439,6 @@ public: } return assign(static_cast(0), static_cast(0), f); } -#else - unsigned int set_expression(const std::basic_string& p, flag_type f = regex_constants::normal) - { - return set_expression(p.data(), p.data() + p.size(), f); - } - - basic_regex(const std::basic_string& p, flag_type f = regex_constants::normal) - { - assign(p, f); - } - - basic_regex& operator=(const std::basic_string& p) - { - return assign(p.data(), p.data() + p.size(), regex_constants::normal); - } - - basic_regex& assign( - const std::basic_string& s, - flag_type f = regex_constants::normal) - { - return assign(s.data(), s.data() + s.size(), f); - } - -#endif // // locale: @@ -695,7 +666,6 @@ void swap(basic_regex& e1, basic_regex& e2) e1.swap(e2); } -#ifndef BOOST_NO_STD_LOCALE template std::basic_ostream& operator << (std::basic_ostream& os, @@ -703,13 +673,6 @@ std::basic_ostream& { return (os << e.str()); } -#else -template -std::ostream& operator << (std::ostream& os, const basic_regex& e) -{ - return (os << e.str()); -} -#endif // // class reg_expression: @@ -741,7 +704,6 @@ public: return this->assign(that); } -#if !defined(BOOST_NO_MEMBER_TEMPLATES) template explicit reg_expression(const std::basic_string& p, flag_type f = regex_constants::normal) : basic_regex(p, f) @@ -760,18 +722,6 @@ public: this->assign(p); return *this; } -#else - explicit reg_expression(const std::basic_string& p, flag_type f = regex_constants::normal) - : basic_regex(p, f) - { - } - - reg_expression& operator=(const std::basic_string& p) - { - this->assign(p); - return *this; - } -#endif }; diff --git a/include/boost/regex/v5/basic_regex_creator.hpp b/include/boost/regex/v5/basic_regex_creator.hpp index c73bb601..ddd2f257 100644 --- a/include/boost/regex/v5/basic_regex_creator.hpp +++ b/include/boost/regex/v5/basic_regex_creator.hpp @@ -42,9 +42,7 @@ struct digraph : public std::pair digraph(charT c1, charT c2) : std::pair(c1, c2) {} digraph(const digraph& d) : std::pair(d.first, d.second){} -#ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS digraph& operator=(const digraph&) = default; -#endif template digraph(const Seq& s) : std::pair() { diff --git a/include/boost/regex/v5/basic_regex_parser.hpp b/include/boost/regex/v5/basic_regex_parser.hpp index 567aab84..858eb805 100644 --- a/include/boost/regex/v5/basic_regex_parser.hpp +++ b/include/boost/regex/v5/basic_regex_parser.hpp @@ -202,7 +202,6 @@ void basic_regex_parser::fail(regex_constants::error_type error_c this->m_pdata->m_status = error_code; m_position = m_end; // don't bother parsing anything else -#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS // // Augment error message with the regular expression text: // @@ -223,7 +222,6 @@ void basic_regex_parser::fail(regex_constants::error_type error_c } message += "'."; } -#endif #ifndef BOOST_NO_EXCEPTIONS if(0 == (this->flags() & regex_constants::no_except)) @@ -457,13 +455,8 @@ bool basic_regex_parser::parse_open_paren() if(0 == (this->flags() & regbase::nosubs)) { markid = ++m_mark_count; -#ifndef BOOST_NO_STD_DISTANCE if(this->flags() & regbase::save_subexpression_location) this->m_pdata->m_subs.push_back(std::pair(std::distance(m_base, m_position) - 1, 0)); -#else - if(this->flags() & regbase::save_subexpression_location) - this->m_pdata->m_subs.push_back(std::pair((m_position - m_base) - 1, 0)); -#endif } re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); pb->index = markid; @@ -522,13 +515,8 @@ bool basic_regex_parser::parse_open_paren() } if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) return false; -#ifndef BOOST_NO_STD_DISTANCE if(markid && (this->flags() & regbase::save_subexpression_location)) this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position); -#else - if(markid && (this->flags() & regbase::save_subexpression_location)) - this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base); -#endif ++m_position; // // append closing parenthesis state: @@ -2428,13 +2416,8 @@ named_capture_jump: if(0 == (this->flags() & regbase::nosubs)) { markid = ++m_mark_count; - #ifndef BOOST_NO_STD_DISTANCE if(this->flags() & regbase::save_subexpression_location) this->m_pdata->m_subs.push_back(std::pair(std::distance(m_base, m_position) - 2, 0)); - #else - if(this->flags() & regbase::save_subexpression_location) - this->m_pdata->m_subs.push_back(std::pair((m_position - m_base) - 2, 0)); - #endif } pb->index = markid; const charT* base = ++m_position; @@ -2707,13 +2690,8 @@ option_group_jump: if(markid > 0) { -#ifndef BOOST_NO_STD_DISTANCE if(this->flags() & regbase::save_subexpression_location) this->m_pdata->m_subs.at((std::size_t)markid - 1).second = std::distance(m_base, m_position) - 1; -#else - if(this->flags() & regbase::save_subexpression_location) - this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base) - 1; -#endif // // allow backrefs to this mark: // diff --git a/include/boost/regex/v5/cpp_regex_traits.hpp b/include/boost/regex/v5/cpp_regex_traits.hpp index 81af9063..26b6f503 100644 --- a/include/boost/regex/v5/cpp_regex_traits.hpp +++ b/include/boost/regex/v5/cpp_regex_traits.hpp @@ -24,8 +24,6 @@ #include #include -#ifndef BOOST_NO_STD_LOCALE - #include #include @@ -160,33 +158,25 @@ struct cpp_regex_traits_base std::locale m_locale; std::ctype const* m_pctype; -#ifndef BOOST_NO_STD_MESSAGES std::messages const* m_pmessages; -#endif std::collate const* m_pcollate; bool operator<(const cpp_regex_traits_base& b)const { if(m_pctype == b.m_pctype) { -#ifndef BOOST_NO_STD_MESSAGES if(m_pmessages == b.m_pmessages) { return m_pcollate < b.m_pcollate; } return m_pmessages < b.m_pmessages; -#else - return m_pcollate < b.m_pcollate; -#endif } return m_pctype < b.m_pctype; } bool operator==(const cpp_regex_traits_base& b)const { return (m_pctype == b.m_pctype) -#ifndef BOOST_NO_STD_MESSAGES && (m_pmessages == b.m_pmessages) -#endif && (m_pcollate == b.m_pcollate); } }; @@ -197,9 +187,7 @@ std::locale cpp_regex_traits_base::imbue(const std::locale& l) std::locale result(m_locale); m_locale = l; m_pctype = &std::use_facet>(l); -#ifndef BOOST_NO_STD_MESSAGES m_pmessages = std::has_facet >(l) ? &std::use_facet >(l) : 0; -#endif m_pcollate = &std::use_facet >(l); return result; } @@ -255,7 +243,6 @@ void cpp_regex_traits_char_layer::init() { // we need to start by initialising our syntax map so we know which // character is used for which purpose: -#ifndef BOOST_NO_STD_MESSAGES #ifndef __IBMCPP__ typename std::messages::catalog cat = static_cast::catalog>(-1); #else @@ -303,7 +290,6 @@ void cpp_regex_traits_char_layer::init() } else { -#endif for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) { const char* ptr = get_default_syntax(i); @@ -313,9 +299,7 @@ void cpp_regex_traits_char_layer::init() ++ptr; } } -#ifndef BOOST_NO_STD_MESSAGES } -#endif } template @@ -971,7 +955,6 @@ namespace BOOST_REGEX_DETAIL_NS { // we need to start by initialising our syntax map so we know which // character is used for which purpose: std::memset(m_char_map, 0, sizeof(m_char_map)); -#ifndef BOOST_NO_STD_MESSAGES #ifndef __IBMCPP__ std::messages::catalog cat = static_cast::catalog>(-1); #else @@ -1018,7 +1001,6 @@ namespace BOOST_REGEX_DETAIL_NS { } else { -#endif for (regex_constants::syntax_type j = 1; j < regex_constants::syntax_max; ++j) { const char* ptr = get_default_syntax(j); @@ -1028,9 +1010,7 @@ namespace BOOST_REGEX_DETAIL_NS { ++ptr; } } -#ifndef BOOST_NO_STD_MESSAGES } -#endif // // finish off by calculating our escape types: // @@ -1056,6 +1036,5 @@ namespace BOOST_REGEX_DETAIL_NS { #pragma warning(pop) #endif -#endif #endif diff --git a/include/boost/regex/v5/cregex.hpp b/include/boost/regex/v5/cregex.hpp index 7ffc6659..a6571052 100644 --- a/include/boost/regex/v5/cregex.hpp +++ b/include/boost/regex/v5/cregex.hpp @@ -51,7 +51,7 @@ namespace boost{ extern "C" { #endif -#if defined(__cplusplus) && !defined(BOOST_NO_STDC_NAMESPACE) +#if defined(__cplusplus) typedef std::ptrdiff_t regoff_t; typedef std::size_t regsize_t; #else diff --git a/include/boost/regex/v5/iterator_category.hpp b/include/boost/regex/v5/iterator_category.hpp index e8ee3307..9bd74578 100644 --- a/include/boost/regex/v5/iterator_category.hpp +++ b/include/boost/regex/v5/iterator_category.hpp @@ -75,10 +75,8 @@ public: static const bool value = answer::value; }; -#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION template const bool is_random_access_iterator::value; -#endif }