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

Function template extract_or_throw

boost::log::extract_or_throw

Synopsis

// In header: <boost/log/attributes/value_extraction.hpp>


template<typename DescriptorT, template< typename > class ActorT> 
  result_of::extract_or_throw< typename DescriptorT::value_type, DescriptorT >::type 
  extract_or_throw(expressions::attribute_keyword< DescriptorT, ActorT > const & keyword, 
                   attribute_value_set const & attrs);

Description

The function extracts an attribute value from the view. The user has to explicitly specify the type or set of possible types of the attribute value to be extracted.

Parameters:

attrs

A set of attribute values in which to look for the specified attribute value.

keyword

The keyword of the attribute value to extract.

Returns:

The extracted value or a non-empty value_ref that refers to the value.

Throws:

An exception is thrown if the requested value cannot be extracted.

PrevUpHomeNext