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 template as

boost::xpressive::op::as — as<> is a PolymorphicFunctionObject for lexically casting a parameter to a different type.

Synopsis

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

template<typename T> 
struct as {
  // types
  typedef T result_type;

  // public member functions
  template<typename Value> T operator()(Value const &) const;
};

Description

Template Parameters

  1. typename T

    The type to which to lexically cast the parameter.

as public member functions

  1. template<typename Value> T operator()(Value const & val) const;

    Parameters:

    val

    The value to lexically cast.

    Returns:

    boost::lexical_cast<T>(val)


PrevUpHomeNext