...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
attribute_as
atomically
extracts an instance of a type from another type. This customization point
is used by the as<T>[]
directive.
#include <boost/spirit/home/support/attributes_fwd.hpp>
Also, see Include Structure.
Note | |
---|---|
This header file does not need to be included directly by any user program as it is normally included by other Spirit header files relying on its content. |
Name |
---|
|
template <typename T, typename Attribute, typename Enable = void> struct attribute_as;
Parameter |
Description |
Default |
---|---|---|
|
The type of the attribute natively exposed by the component the
|
none |
|
The type of the attribute to be used to generate output from. |
none |
|
Helper template parameter usable to selectively enable or disable
certain specializations of |
|
Notation
attr
An instance of type Attrib
.
Expression |
Semantics |
---|---|
|
The result type of the extraction. |
|
Extract and return an instance of |
|
Determine, at runtime, if the extraction of an instance of |
Spirit predefines specializations of this customization point for several types. The following table lists those types together with the types exposed and the corresponding semantics:
Template Parameters |
Semantics |
---|---|
|
The exposed typedef |
This customization point may need to be implemented when using the as<T>[]
directive.