Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Click here to view the latest version of this page.
PrevUpHomeNext

Reference

Header <boost/xpressive/basic_regex.hpp>
Header <boost/xpressive/match_results.hpp>
Header <boost/xpressive/regex_actions.hpp>
Header <boost/xpressive/regex_algorithms.hpp>
Header <boost/xpressive/regex_compiler.hpp>
Header <boost/xpressive/regex_constants.hpp>
Header <boost/xpressive/regex_error.hpp>
Header <boost/xpressive/regex_iterator.hpp>
Header <boost/xpressive/regex_primitives.hpp>
Header <boost/xpressive/regex_token_iterator.hpp>
Header <boost/xpressive/regex_traits.hpp>
Header <boost/xpressive/sub_match.hpp>
Header <boost/xpressive/traits/c_regex_traits.hpp>
Header <boost/xpressive/traits/cpp_regex_traits.hpp>
Header <boost/xpressive/traits/null_regex_traits.hpp>
Header <boost/xpressive/xpressive.hpp>
Header <boost/xpressive/xpressive_dynamic.hpp>
Header <boost/xpressive/xpressive_fwd.hpp>
Header <boost/xpressive/xpressive_static.hpp>
Header <boost/xpressive/xpressive_typeof.hpp>

Contains the definition of the basic_regex<> class template and its associated helper functions.

namespace boost {
  namespace xpressive {
    template<typename BidiIter> struct basic_regex;
    template<typename BidiIter> 
      void swap(basic_regex< BidiIter > &, basic_regex< BidiIter > &);
  }
}

Contains the definition of the match_results type and associated helpers. The match_results type holds the results of a regex_match() or regex_search() operation.

namespace boost {
  namespace xpressive {
    template<typename BidiIter> struct match_results;
    template<typename BidiIter> struct regex_id_filter_predicate;
  }
}

Defines the syntax elements of xpressive's action expressions.

namespace boost {
  namespace xpressive {
    template<typename Fun> struct function;
    template<typename T> struct value;
    template<typename T> struct reference;
    template<typename T> struct local;
    template<typename T, int I, typename Dummy> struct placeholder;

    function< op::push >::type const push;
    function< op::push_back >::type const push_back;
    function< op::push_front >::type const push_front;
    function< op::pop >::type const pop;
    function< op::pop_back >::type const pop_back;
    function< op::pop_front >::type const pop_front;
    function< op::top >::type const top;
    function< op::back >::type const back;
    function< op::front >::type const front;
    function< op::first >::type const first;
    function< op::second >::type const second;
    function< op::matched >::type const matched;
    function< op::length >::type const length;
    function< op::str >::type const str;
    function< op::insert >::type const insert;
    function< op::make_pair >::type const make_pair;
     static_cast_;
    () dynamic_cast_;
    ()() const_cast_;
    unspecified check;
    unspecified let;
     BOOST_PROTO_DEFINE_FUNCTION_TEMPLATE(1, as, boost::proto::default_domain, 
                                          (boost::proto::tag::function), 
                                          ((op::as)(typename)));
    template<typename T> reference< T > const ref(T &);
    template<typename T> reference< T const  > const cref(T const &);
     BOOST_PROTO_DEFINE_VARARG_FUNCTION_TEMPLATE(construct, 
                                                 boost::proto::default_domain, 
                                                 (boost::proto::tag::function), 
                                                 ((op::construct)(typename)));
    namespace op {
      struct push;
      struct push_back;
      struct push_front;
      struct pop;
      struct pop_back;
      struct pop_front;
      struct front;
      struct back;
      struct top;
      struct first;
      struct second;
      struct matched;
      struct length;
      struct str;
      struct insert;
      struct make_pair;
      template<typename T> struct as;
      template<typename T> struct static_cast_;
      template<typename T> struct dynamic_cast_;
      template<typename T> struct const_cast_;
      template<typename T> struct construct;
      template<typename Except> struct throw_;
    }
  }
}

Contains the regex_match(), regex_search() and regex_replace() algorithms.

namespace boost {
  namespace xpressive {
    template<typename OtherBidiIter, typename BidiIter> 
      bool regex_match(OtherBidiIter, OtherBidiIter, 
                       match_results< BidiIter > &, 
                       basic_regex< BidiIter > const &, 
                       regex_constants::match_flag_type = regex_constants::match_default);
    template<typename OtherBidiIter, typename BidiIter> 
      bool regex_match(OtherBidiIter, OtherBidiIter, 
                       basic_regex< BidiIter > const &, 
                       regex_constants::match_flag_type = regex_constants::match_default);
    template<typename Char> 
      bool regex_match(Char *, match_results< Char * > &, 
                       basic_regex< Char * > const &, 
                       regex_constants::match_flag_type = regex_constants::match_default);
    template<typename BidiRange, typename BidiIter> 
      bool regex_match(BidiRange &, match_results< BidiIter > &, 
                       basic_regex< BidiIter > const &, 
                       regex_constants::match_flag_type = regex_constants::match_default, 
                       typename disable_if< is_pointer< BidiRange > >::type * = 0);
    template<typename BidiRange, typename BidiIter> 
      bool regex_match(BidiRange const &, match_results< BidiIter > &, 
                       basic_regex< BidiIter > const &, 
                       regex_constants::match_flag_type = regex_constants::match_default, 
                       typename disable_if< is_pointer< BidiRange > >::type * = 0);
    template<typename Char> 
      bool regex_match(Char *, basic_regex< Char * > const &, 
                       regex_constants::match_flag_type = regex_constants::match_default);
    template<typename BidiRange, typename BidiIter> 
      bool regex_match(BidiRange &, basic_regex< BidiIter > const &, 
                       regex_constants::match_flag_type = regex_constants::match_default, 
                       typename disable_if< is_pointer< BidiRange > >::type * = 0);
    template<typename BidiRange, typename BidiIter> 
      bool regex_match(BidiRange const &, basic_regex< BidiIter > const &, 
                       regex_constants::match_flag_type = regex_constants::match_default, 
                       typename disable_if< is_pointer< BidiRange > >::type * = 0);
    template<typename OtherBidiIter, typename BidiIter> 
      bool regex_search(OtherBidiIter, OtherBidiIter, 
                        match_results< BidiIter > &, 
                        basic_regex< BidiIter > const &, 
                        regex_constants::match_flag_type = regex_constants::match_default);
    template<typename OtherBidiIter, typename BidiIter> 
      bool regex_search(OtherBidiIter, OtherBidiIter, 
                        basic_regex< BidiIter > const &, 
                        regex_constants::match_flag_type = regex_constants::match_default);
    template<typename Char> 
      bool regex_search(Char *, match_results< Char * > &, 
                        basic_regex< Char * > const &, 
                        regex_constants::match_flag_type = regex_constants::match_default);
    template<typename BidiRange, typename BidiIter> 
      bool regex_search(BidiRange &, match_results< BidiIter > &, 
                        basic_regex< BidiIter > const &, 
                        regex_constants::match_flag_type = regex_constants::match_default, 
                        typename disable_if< is_pointer< BidiRange > >::type * = 0);
    template<typename BidiRange, typename BidiIter> 
      bool regex_search(BidiRange const &, match_results< BidiIter > &, 
                        basic_regex< BidiIter > const &, 
                        regex_constants::match_flag_type = regex_constants::match_default, 
                        typename disable_if< is_pointer< BidiRange > >::type * = 0);
    template<typename Char> 
      bool regex_search(Char *, basic_regex< Char * > const &, 
                        regex_constants::match_flag_type = regex_constants::match_default);
    template<typename BidiRange, typename BidiIter> 
      bool regex_search(BidiRange &, basic_regex< BidiIter > const &, 
                        regex_constants::match_flag_type = regex_constants::match_default, 
                        typename disable_if< is_pointer< BidiRange > >::type * = 0);
    template<typename BidiRange, typename BidiIter> 
      bool regex_search(BidiRange const &, basic_regex< BidiIter > const &, 
                        regex_constants::match_flag_type = regex_constants::match_default, 
                        typename disable_if< is_pointer< BidiRange > >::type * = 0);
    template<typename OutIter, typename OtherBidiIter, typename BidiIter> 
      OutIter regex_replace(OutIter, OtherBidiIter, OtherBidiIter, 
                            basic_regex< BidiIter > const &, 
                            std::basic_string< typename iterator_value< BidiIter >::type > const &, 
                            regex_constants::match_flag_type = regex_constants::match_default);
    template<typename Char> 
      std::basic_string< Char > 
      regex_replace(std::basic_string< Char > const &, 
                    basic_regex< typename std::basic_string< Char >::const_iterator > const &, 
                    std::basic_string< Char > const &, 
                    regex_constants::match_flag_type = regex_constants::match_default);
  }
}

Contains the definition of regex_compiler, a factory for building regex objects from strings.

namespace boost {
  namespace xpressive {
    template<typename BidiIter, typename RegexTraits, typename CompilerTraits> 
      struct regex_compiler;
  }
}

Contains definitions for the syntax_option_type, match_flag_type and error_type enumerations.

namespace boost {
  namespace xpressive {
    namespace regex_constants {
      enum syntax_option_type;
      enum match_flag_type;
      enum error_type;
    }
  }
}

Contains the definition of the regex_error exception class.

namespace boost {
  namespace xpressive {
    struct regex_error;
  }
}

Contains the definition of the regex_iterator type, an STL-compatible iterator for stepping through all the matches in a sequence.

namespace boost {
  namespace xpressive {
    template<typename BidiIter> struct regex_iterator;
  }
}

Contains the syntax elements for writing static regular expressions.

namespace boost {
  namespace xpressive {
    unsigned int const inf;
    unspecified nil;
    unspecified alnum;
    unspecified alpha;
    unspecified blank;
    unspecified cntrl;
    unspecified digit;
    unspecified graph;
    unspecified lower;
    unspecified print;
    unspecified punct;
    unspecified space;
    unspecified upper;
    unspecified xdigit;
    unspecified bos;
    unspecified eos;
    unspecified bol;
    unspecified eol;
    unspecified bow;
    unspecified eow;
    unspecified _b;
    unspecified _w;
    unspecified _d;
    unspecified _s;
    proto::terminal< char >::type const _n;
    unspecified _ln;
    unspecified _;
    unspecified self;
    unspecified set;
    mark_tag::proto_base_expr const s0;
    mark_tag::proto_base_expr const s1;
    mark_tag::proto_base_expr const s2;
    mark_tag::proto_base_expr const s3;
    mark_tag::proto_base_expr const s4;
    mark_tag::proto_base_expr const s5;
    mark_tag::proto_base_expr const s6;
    mark_tag::proto_base_expr const s7;
    mark_tag::proto_base_expr const s8;
    mark_tag::proto_base_expr const s9;
    unspecified a1;
    unspecified a2;
    unspecified a3;
    unspecified a4;
    unspecified a5;
    unspecified a6;
    unspecified a7;
    unspecified a8;
    unspecified a9;
    template<typename Expr> unspecified icase(Expr const &);
    template<typename Literal> unspecified as_xpr(Literal const &);
    template<typename BidiIter> 
      proto::terminal< reference_wrapper< basic_regex< BidiIter > const  > >::type const 
      by_ref(basic_regex< BidiIter > const &);
    template<typename Char> unspecified range(Char, Char);
    template<typename Expr> unspecified optional(Expr const &);
    template<unsigned int Min, unsigned int Max, typename Expr> 
      unspecified repeat(Expr const &);
    template<unsigned int Count, typename Expr2> 
      unspecified repeat(Expr2 const &);
    template<typename Expr> unspecified keep(Expr const &);
    template<typename Expr> unspecified before(Expr const &);
    template<typename Expr> unspecified after(Expr const &);
    template<typename Locale> unspecified imbue(Locale const &);
  }
}

Contains the definition of regex_token_iterator, and STL-compatible iterator for tokenizing a string using a regular expression.

namespace boost {
  namespace xpressive {
    template<typename BidiIter> struct regex_token_iterator;
  }
}

Includes the C regex traits or the CPP regex traits header file depending on the BOOST_XPRESSIVE_USE_C_TRAITS macro.

namespace boost {
  namespace xpressive {
    struct regex_traits_version_1_tag;
    struct regex_traits_version_2_tag;
    template<typename Traits> struct has_fold_case;
    template<typename Char, typename Impl> struct regex_traits;
  }
}

Contains the definition of the class template sub_match<> and associated helper functions

namespace boost {
  namespace xpressive {
    template<typename BidiIter> struct sub_match;
    template<typename BidiIter, typename Char, typename Traits> 
      std::basic_ostream< Char, Traits > & 
      operator<<(std::basic_ostream< Char, Traits > &, 
                 sub_match< BidiIter > const &);
    template<typename BidiIter> 
      bool operator==(sub_match< BidiIter > const & lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator!=(sub_match< BidiIter > const & lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator<(sub_match< BidiIter > const & lhs, 
                     sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator<=(sub_match< BidiIter > const & lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator>=(sub_match< BidiIter > const & lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator>(sub_match< BidiIter > const & lhs, 
                     sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator==(typename iterator_value< BidiIter >::type const * lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator!=(typename iterator_value< BidiIter >::type const * lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator<(typename iterator_value< BidiIter >::type const * lhs, 
                     sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator>(typename iterator_value< BidiIter >::type const * lhs, 
                     sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator>=(typename iterator_value< BidiIter >::type const * lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator<=(typename iterator_value< BidiIter >::type const * lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator==(sub_match< BidiIter > const & lhs, 
                      typename iterator_value< BidiIter >::type const * rhs);
    template<typename BidiIter> 
      bool operator!=(sub_match< BidiIter > const & lhs, 
                      typename iterator_value< BidiIter >::type const * rhs);
    template<typename BidiIter> 
      bool operator<(sub_match< BidiIter > const & lhs, 
                     typename iterator_value< BidiIter >::type const * rhs);
    template<typename BidiIter> 
      bool operator>(sub_match< BidiIter > const & lhs, 
                     typename iterator_value< BidiIter >::type const * rhs);
    template<typename BidiIter> 
      bool operator>=(sub_match< BidiIter > const & lhs, 
                      typename iterator_value< BidiIter >::type const * rhs);
    template<typename BidiIter> 
      bool operator<=(sub_match< BidiIter > const & lhs, 
                      typename iterator_value< BidiIter >::type const * rhs);
    template<typename BidiIter> 
      bool operator==(typename iterator_value< BidiIter >::type const & lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator!=(typename iterator_value< BidiIter >::type const & lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator<(typename iterator_value< BidiIter >::type const & lhs, 
                     sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator>(typename iterator_value< BidiIter >::type const & lhs, 
                     sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator>=(typename iterator_value< BidiIter >::type const & lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator<=(typename iterator_value< BidiIter >::type const & lhs, 
                      sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      bool operator==(sub_match< BidiIter > const & lhs, 
                      typename iterator_value< BidiIter >::type const & rhs);
    template<typename BidiIter> 
      bool operator!=(sub_match< BidiIter > const & lhs, 
                      typename iterator_value< BidiIter >::type const & rhs);
    template<typename BidiIter> 
      bool operator<(sub_match< BidiIter > const & lhs, 
                     typename iterator_value< BidiIter >::type const & rhs);
    template<typename BidiIter> 
      bool operator>(sub_match< BidiIter > const & lhs, 
                     typename iterator_value< BidiIter >::type const & rhs);
    template<typename BidiIter> 
      bool operator>=(sub_match< BidiIter > const & lhs, 
                      typename iterator_value< BidiIter >::type const & rhs);
    template<typename BidiIter> 
      bool operator<=(sub_match< BidiIter > const & lhs, 
                      typename iterator_value< BidiIter >::type const & rhs);
    template<typename BidiIter> 
      sub_match< BidiIter >::string_type 
      operator+(sub_match< BidiIter > const & lhs, 
                sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      sub_match< BidiIter >::string_type 
      operator+(sub_match< BidiIter > const & lhs, 
                typename iterator_value< BidiIter >::type const & rhs);
    template<typename BidiIter> 
      sub_match< BidiIter >::string_type 
      operator+(typename iterator_value< BidiIter >::type const & lhs, 
                sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      sub_match< BidiIter >::string_type 
      operator+(sub_match< BidiIter > const & lhs, 
                typename iterator_value< BidiIter >::type const * rhs);
    template<typename BidiIter> 
      sub_match< BidiIter >::string_type 
      operator+(typename iterator_value< BidiIter >::type const * lhs, 
                sub_match< BidiIter > const & rhs);
    template<typename BidiIter> 
      sub_match< BidiIter >::string_type 
      operator+(sub_match< BidiIter > const & lhs, 
                typename sub_match< BidiIter >::string_type const & rhs);
    template<typename BidiIter> 
      sub_match< BidiIter >::string_type 
      operator+(typename sub_match< BidiIter >::string_type const & lhs, 
                sub_match< BidiIter > const & rhs);
  }
}

Contains the definition of the c_regex_traits<> template, which is a wrapper for the C locale functions that can be used to customize the behavior of static and dynamic regexes.

namespace boost {
  namespace xpressive {
    template<typename Char> struct c_regex_traits;

    template<> struct has_fold_case<c_regex_traits< char >>;
  }
}

Contains the definition of the cpp_regex_traits<> template, which is a wrapper for std::locale that can be used to customize the behavior of static and dynamic regexes.

namespace boost {
  namespace xpressive {
    template<typename Char> struct cpp_regex_traits;

    template<> struct has_fold_case<cpp_regex_traits< char >>;
  }
}

Contains the definition of the null_regex_traits<> template, which is a stub regex traits implementation that can be used by static and dynamic regexes for searching non-character data.

namespace boost {
  namespace xpressive {
    template<typename Elem> struct null_regex_traits;
  }
}

Includes all of xpressive including support for both static and dynamic regular expressions.

Includes everything you need to write and use dynamic regular expressions.

Forward declarations for all of xpressive's public data types.


BOOST_PROTO_FUSION_V2
BOOST_XPRESSIVE_HAS_MS_STACK_GUARD
namespace boost {
  namespace xpressive {
    typedef void const * regex_id_type;
    typedef basic_regex< std::string::const_iterator > sregex;
    typedef basic_regex< char const * > cregex;
    typedef basic_regex< std::wstring::const_iterator > wsregex;
    typedef basic_regex< wchar_t const * > wcregex;
    typedef sub_match< std::string::const_iterator > ssub_match;
    typedef sub_match< char const * > csub_match;
    typedef sub_match< std::wstring::const_iterator > wssub_match;
    typedef sub_match< wchar_t const * > wcsub_match;
    typedef regex_compiler< std::string::const_iterator > sregex_compiler;
    typedef regex_compiler< char const * > cregex_compiler;
    typedef regex_compiler< std::wstring::const_iterator > wsregex_compiler;
    typedef regex_compiler< wchar_t const * > wcregex_compiler;
    typedef regex_iterator< std::string::const_iterator > sregex_iterator;
    typedef regex_iterator< char const * > cregex_iterator;
    typedef regex_iterator< std::wstring::const_iterator > wsregex_iterator;
    typedef regex_iterator< wchar_t const * > wcregex_iterator;
    typedef regex_token_iterator< std::string::const_iterator > sregex_token_iterator;
    typedef regex_token_iterator< char const * > cregex_token_iterator;
    typedef regex_token_iterator< std::wstring::const_iterator > wsregex_token_iterator;
    typedef regex_token_iterator< wchar_t const * > wcregex_token_iterator;
    typedef match_results< std::string::const_iterator > smatch;
    typedef match_results< char const * > cmatch;
    typedef match_results< std::wstring::const_iterator > wsmatch;
    typedef match_results< wchar_t const * > wcmatch;
    typedef regex_id_filter_predicate< std::string::const_iterator > sregex_id_filter_predicate;
    typedef regex_id_filter_predicate< char const * > cregex_id_filter_predicate;
    typedef regex_id_filter_predicate< std::wstring::const_iterator > wsregex_id_filter_predicate;
    typedef regex_id_filter_predicate< wchar_t const * > wcregex_id_filter_predicate;
  }
}

Includes everything you need to write static regular expressions and use them.

Type registrations so that xpressive can be used with the Boost.Typeof library.


PrevUpHomeNext