| Home | Libraries | People | FAQ | More

## Struct template throw_

boost::xpressive::op::throw_ — `throw_<>` is a PolymorphicFunctionObject for throwing an exception.

## Synopsis

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

    template<typename Except>
    struct throw_ {
      // types
      typedef void result_type;

      // public member functions
      void operator()() const;
      template<typename A0> void operator()(A0 const &) const;
      template<typename A0, typename A1>
        void operator()(A0 const &, A1 const &) const;
      template<typename A0, typename A1, typename A2>
        void operator()(A0 const &, A1 const &, A2 const &) const;
    };

## Description

### Template Parameters

1.     typename Except

   The type of the object to throw.

### `throw_` public member functions

1.     void operator()() const;

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

2.     template<typename A0> void operator()(A0 const & a0) 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 A0, typename A1>
         void operator()(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.

4.     template<typename A0, typename A1, typename A2>
         void operator()(A0 const & a0, A1 const & a1, A2 const & a2) const;

   | Note
   This function makes use of the `BOOST_THROW_EXCEPTION` macro to actually throw the exception. See the documentation for the Boost.Exception library.

   Parameters: |

   `a0` | The first argument to the constructor
   `a1` | The second argument to the constructor
   `a2` | The third argument to the constructor

   Throws: | <tt>Except(a0