RESTinio

Public Types | List of all members
restinio::easy_parser::result_wrapper_for< T > Struct Template Reference

A metafunction for detection of actual result_value_wrapper type for T. More...

`#include <easy_parser.hpp>`

## Public Types
using | type = result_value_wrapper< T >

## Detailed Description

template<typename T>
struct restinio::easy_parser::result_wrapper_for< T >

A metafunction for detection of actual result_value_wrapper type for T.

If a specialization of result_value_wrapper defines wrapped_type as a different type from result_type then transform() and consume() methods will receive a reference to wrapped_type. And there will be a task to detect actual result_type from a wrapped_type.

To solve this task it is necessary to have a way to get result_value_wrapper<result_type> from wrapped_type.

This metafunction is that way.

Note
  For each specialization of result_value_wrapper<T> that introduces wrapped_type different from result_type a specialization of result_wrapper_for should also be provided. For example:
  class my_type {...};
  class my_type_wrapper { ... };
  namespace restinio {
  namespace easy_parser {
  template<>
  struct result_value_wrapper<my_type> {
  using result_type = my_type;
  using wrapped_type = my_type_wrapper;
  ...
  };
  template<>
  struct result_wrapper_for<my_type_wrapper> {
  using type = result_value_wrapper<my_type>;
  };
  } // namespace easy_parser
  } // namespace restinio
  restinio::easy_parser
  Definition: easy_parser.hpp:39
  restinio
  Definition: asio_include.hpp:21
  restinio::easy_parser::result_wrapper_for::type
  result_value_wrapper< T > type
  Definition: easy_parser.hpp:246

Since
  v.0.6.6

Definition at line 244 of file easy_parser.hpp.

## Member Typedef Documentation

## ◆ type

template<typename T >

using restinio::easy_parser::result_wrapper_for< T >::type = result_value_wrapper< T >

Definition at line 246 of file easy_parser.hpp.

The documentation for this struct was generated from the following file:

- restinio/helpers/easy_parser.hpp