AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Memory.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 
16 /*
17  * Portions of this file adapted from a code sample by Herb Sutter at https://herbsutter.com/gotw/_102/,
18  * retrieved Dec. 21, 2016, as indicated below.
19  */
20 
21 #ifndef ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_MEMORY_MEMORY_H_
22 #define ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_MEMORY_MEMORY_H_
23 
24 #include <memory>
25 #include <utility>
26 
27 namespace alexaClientSDK {
28 namespace avsCommon {
29 namespace utils {
30 namespace memory {
31 
32 // START Herb Sutter code sample adaptation
33 template <typename T, typename... Args>
34 std::unique_ptr<T> make_unique(Args&&... args) {
35  return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
36 }
37 // END Herb Sutter code sample adaptation
38 
39 } // namespace memory
40 } // namespace utils
41 } // namespace avsCommon
42 } // namespace alexaClientSDK
43 
44 #endif // ALEXA_CLIENT_SDK_AVSCOMMON_UTILS_INCLUDE_AVSCOMMON_UTILS_MEMORY_MEMORY_H_
def args
Definition: android_test.py:111
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
Definition: gmock-generated-matchers.h:481
std::unique_ptr< T > make_unique(Args &&... args)
Definition: Memory.h:34
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36

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