AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
alexaClientSDK::acsdkManufactory::internal::Fold Struct Reference

#include <Utils.h>


struct  Apply
struct  Apply< Operation, Result0 >
struct  Apply< Operation, Result0, A1 >
struct  Apply< Operation, Result0, A1, A2 >
struct  Apply< Operation, Result0, A1, A2, A3 >
struct  Apply< Operation, Result0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, An... >
struct  Apply< Operation, Result0, A1, A2, A3, A4, A5, A6, A7, An... >
struct  Apply< Operation, Result0, A1, A2, A3, A4, An... >

Detailed Description

Template for performing an operation on all elements of a parameter pack.

The template is invoked via Fold::Apply<Operation, Result, An...> where:

Operation is a struct with a template named Operation::Apply of the form: Apply<Result, Type> where Result is the incoming accumulated result and Type is the new type to operate upon. The type resulting from Operation::Apply must define a new result type that defines 'type' as the result.

Result is the Result value passed in to the first invocation of Operation::Apply.

An... is the parameter pack whose types will be iterated over.

Note that Fold uses explicit loop unrolling to minimize nesting of template expansions and the resulting unfortunate behavior of some compilers.

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

AlexaClientSDK 3.0.0 - Copyright 2016-2022, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0