.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 ================ Deduction guides ================ If possible, ``concurrent_multimap`` constructors support class template argument deduction (since C++17). Copy and move constructors, including constructors with an explicit ``allocator_type`` argument, provide implicitly-generated deduction guides. In addition, the following explicit deduction guides are provided: .. code:: cpp template >, typename Allocator = tbb_allocator>> concurrent_multimap( InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator() ) -> concurrent_multimap, iterator_mapped_t, Compare, Allocator>; template concurrent_multimap( InputIterator, InputIterator, Allocator ) -> concurrent_multimap, iterator_mapped_t, std::less>, Allocator>; template >, typename Allocator = tbb_allocator>> concurrent_multimap( std::initializer_list>, Compare = Compare(), Allocator = Allocator() ) -> concurrent_multimap, T, Compare, Allocator>; template concurrent_multimap( std::initializer_list>, Allocator ) -> concurrent_multimap, T, std::less>, Allocator>; where the type aliases ``iterator_key_t``, ``iterator_mapped_t``, ``iterator_alloc_value_t`` are defined as follows: .. code:: cpp template using iterator_key_t = std::remove_const_t::value_type::first_type>; template using iterator_mapped_t = typename std::iterator_traits::value_type::second_type; template using iterator_alloc_value_t = std::pair>, iterator_mapped_t>; These deduction guides only participate in the overload resolution if the following requirements are met: * The ``InputIterator`` type meets the ``InputIterator`` requirements described in the [input.iterators] section of the ISO C++ Standard. * The ``Allocator`` type meets the ``Allocator`` requirements described in the [allocator.requirements] section of the ISO C++ Standard. * The ``Compare`` type does not meet the ``Allocator`` requirements. **Example** .. code:: cpp #include #include int main() { std::vector> v; // Deduces cm1 as concurrent_multimap oneapi::tbb::concurrent_multimap cm1(v.begin(), v.end()); // Deduces cm2 as concurrent_multimap oneapi::tbb::concurrent_multimap cm2({std::pair(1, 2f), std::pair(2, 3f)}); }