A function template that creates and returns an object of a type that implements a non-observable associative collection (map). The object is returned as an IMap, and that's the interface via which you call the returned object's functions and properties.
You can optionally pass an existing std::map or std::unordered_map rvalue into the functionâeither pass a temporary object, or call std::move on an lvalue.
For more info, and code examples, see Collections with C++/WinRT.
Syntaxtemplate <typename K, typename V, typename Compare = std::less<K>, typename Allocator = std::allocator<std::pair<K const, V>>>
winrt::Windows::Foundation::Collections::IMap<K, V> single_threaded_map()
template <typename K, typename V, typename Compare = std::less<K>, typename Allocator = std::allocator<std::pair<K const, V>>>
winrt::Windows::Foundation::Collections::IMap<K, V> single_threaded_map(std::map<K, V, Compare, Allocator>&& values)
template <typename K, typename V, typename Hash = std::hash<K>, typename KeyEqual = std::equal_to<K>, typename Allocator = std::allocator<std::pair<K const, V>>>
winrt::Windows::Foundation::Collections::IMap<K, V> single_threaded_map(std::unordered_map<K, V, Hash, KeyEqual, Allocator>&& values)
Template parameters
typename K
The type of the keys in the collection.
typename V
The type of the values in the collection.
typename Compare
The type of the comparator to use to compare keys.
typename Allocator
The type of the allocator of the associative container from which you initialize the collection, if you pass one, otherwise the default allocator.
values
An optional reference to an rvalue of type std::map or std::unordered_map from which to initialize the elements of the collection object.
An IMap representing a new collection object.
RequirementsMinimum supported SDK: Windows SDK version 10.0.17763.0 (Windows 10, version 1809)
Namespace: winrt
Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\Windows.Foundation.Collections.h
See alsoRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4