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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Struct insert

boost::xpressive::op::insert

Synopsis

// In header: <boost/xpressive/regex_actions.hpp>


struct insert {
  // member classes/structs/unions
  template<typename Sig, typename EnableIf = void> 
  struct result {
  };
  template<typename This, typename Cont, typename It> 
  struct result<This(Cont, It, It), void> {
    // types
    typedef void type;
  };
  template<typename This, typename Cont, typename It, typename Size, 
           typename Value> 
  struct result<This(Cont, It, Size, Value), typename disable_if< is_integral< typename remove_const< typename remove_reference< It >::type >::type > >::type> {
    // types
    typedef void type;
  };
  template<typename This, typename Cont, typename It, typename Value> 
  struct result<This(Cont, It, Value), typename disable_if< mpl::or_< is_integral< typename remove_const< typename remove_reference< It >::type >::type >, is_same< typename remove_const< typename remove_reference< It >::type >::type, typename remove_const< typename remove_reference< Value >::type >::type > > >::type> {
    // types
    typedef remove_reference< Cont >::type::iterator type;
  };
  template<typename This, typename Cont, typename Size, typename A0, 
           typename A1> 
  struct result<This(Cont, Size, A0, A1), typename enable_if< is_integral< typename remove_const< typename remove_reference< Size >::type >::type > >::type> {
    // types
    typedef remove_reference< Cont >::type & type;
  };
  template<typename This, typename Cont, typename Size, typename T> 
  struct result<This(Cont, Size, T), typename enable_if< is_integral< typename remove_const< typename remove_reference< Size >::type >::type > >::type> {
    // types
    typedef remove_reference< Cont >::type & type;
  };
  template<typename This, typename Cont, typename Value> 
  struct result<This(Cont, Value), void> {
    // types
    typedef remove_reference< Cont >::type                                                                                cont_type; 
    typedef remove_reference< Value >::type                                                                               value_type;
    typedef char                                                                                                          yes_type;  
    typedef char(&                                                                                                        no_type;   
    typedef mpl::if_c< is_iterator, typename cont_type::iterator, std::pair< typename cont_type::iterator, bool > >::type type;      

    // public static functions
    static yes_type check_insert_return(typename cont_type::iterator);
    static no_type 
    check_insert_return(std::pair< typename cont_type::iterator, bool >);

    // public data members
    static cont_type & scont_;
    static value_type & svalue_;
    static bool const is_iterator;
  };

  // public member functions
  template<typename Cont, typename A0> 
    result< insert(Cont &, A0 const &)>::type 
    operator()(Cont &, A0 const &) const;
  template<typename Cont, typename A0, typename A1> 
    result< insert(Cont &, A0 const &, A1 const &)>::type 
    operator()(Cont &, A0 const &, A1 const &) const;
  template<typename Cont, typename A0, typename A1, typename A2> 
    result< insert(Cont &, A0 const &, A1 const &, A2 const &)>::type 
    operator()(Cont &, A0 const &, A1 const &, A2 const &) const;
};

Description

insert public member functions

  1. template<typename Cont, typename A0> 
      result< insert(Cont &, A0 const &)>::type 
      operator()(Cont & cont, A0 const & a0) const;
    operator()
  2. template<typename Cont, typename A0, typename A1> 
      result< insert(Cont &, A0 const &, A1 const &)>::type 
      operator()(Cont & cont, A0 const & a0, A1 const & a1) const;

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

  3. template<typename Cont, typename A0, typename A1, typename A2> 
      result< insert(Cont &, A0 const &, A1 const &, A2 const &)>::type 
      operator()(Cont & cont, A0 const & a0, A1 const & a1, A2 const & a2) const;

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


PrevUpHomeNext