1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 
8 #include <aws/core/Core_EXPORTS.h>
9 
10 #include <aws/core/utils/memory/stl/AWSAllocator.h>
11 
12 #include <map>
13 #include <unordered_map>
14 #include <cstring>
15 
16 namespace Aws
17 {
18 
19 template< typename K, typename V > using Map = std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > >;
20 template< typename K, typename V > using UnorderedMap = std::unordered_map< K, V, std::hash< K >, std::equal_to< K >, Aws::Allocator< std::pair< const K, V > > >;
21 template< typename K, typename V > using MultiMap = std::multimap< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > >;
22 
23 struct CompareStrings
24 {
operatorCompareStrings25     bool operator()(const char* a, const char* b) const
26     {
27         return std::strcmp(a, b) < 0;
28     }
29 };
30 
31 template<typename V> using CStringMap = std::map<const char*, V, CompareStrings, Aws::Allocator<std::pair<const char*, V> > >;
32 
33 } // namespace Aws
34