diff --git a/source/elements/oneTBB/source/containers/concurrent_bounded_queue_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_bounded_queue_cls/deduction_guides.rst index df4d43097..bd39d0b36 100644 --- a/source/elements/oneTBB/source/containers/concurrent_bounded_queue_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_bounded_queue_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,15 +6,19 @@ Deduction guides ================ -Where possible, constructors of ``tbb::concurrent_bounded_queue`` support class template argument -deduction (since C++17): +If possible, ``concurrent_bounded_queue`` 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 guide is provided: .. code:: cpp template > - concurrent_bounded_queue( InputIterator, InputIterator, const Allocator& = Allocator() ) - -> concurrent_bounded_queue, Allocator>; + typename Allocator = tbb::cache_aligned_allocator> + concurrent_bounded_queue( InputIterator, InputIterator, + Allocator = Allocator() ) + -> concurrent_bounded_queue, + Allocator>; Where the type alias ``iterator_value_t`` is defined as follows: @@ -23,6 +27,11 @@ Where the type alias ``iterator_value_t`` is defined as follows: template using iterator_value_t = typename std::iterator_traits::value_type; +This 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. + **Example** .. code:: cpp diff --git a/source/elements/oneTBB/source/containers/concurrent_hash_map_cls.rst b/source/elements/oneTBB/source/containers/concurrent_hash_map_cls.rst index 6155c3cf6..c8d5826d7 100644 --- a/source/elements/oneTBB/source/containers/concurrent_hash_map_cls.rst +++ b/source/elements/oneTBB/source/containers/concurrent_hash_map_cls.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -33,6 +33,7 @@ Class Template Synopsis using pointer = typename std::allocator_traits::pointer; using const_pointer = typename std::allocator_traits::const_pointer; + using hash_compare_type = HashCompare; using allocator_type = Allocator; using size_type = ; @@ -50,19 +51,19 @@ Class Template Synopsis // Construction, destruction, copying concurrent_hash_map(); - explicit concurrent_hash_map( const HashCompare& compare, + explicit concurrent_hash_map( const hash_compare_type& compare, const allocator_type& alloc = allocator_type() ); explicit concurrent_hash_map( const allocator_type& alloc ); - concurrent_hash_map( size_type n, const HashCompare& compare, + concurrent_hash_map( size_type n, const hash_compare_type& compare, const allocator_type& alloc = allocator_type() ); concurrent_hash_map( size_type n, const allocator_type& alloc = allocator_type() ); template concurrent_hash_map( InputIterator first, InputIterator last, - const HashCompare& compare, + const hash_compare_type& compare, const allocator_type& alloc = allocator_type() ); template @@ -70,11 +71,11 @@ Class Template Synopsis const allocator_type& alloc = allocator_type() ); concurrent_hash_map( std::initializer_list init, - const HashCompare& compare, + const hash_compare_type& compare = hash_compare_type(), const allocator_type& alloc = allocator_type() ); concurrent_hash_map( std::initializer_list init, - const allocator_type& alloc = allocator_type() ); + const allocator_type& alloc ); concurrent_hash_map( const concurrent_hash_map& other ); concurrent_hash_map( const concurrent_hash_map& other, diff --git a/source/elements/oneTBB/source/containers/concurrent_hash_map_cls/construct_destroy_copy.rst b/source/elements/oneTBB/source/containers/concurrent_hash_map_cls/construct_destroy_copy.rst index 9fd2052ae..e55018003 100644 --- a/source/elements/oneTBB/source/containers/concurrent_hash_map_cls/construct_destroy_copy.rst +++ b/source/elements/oneTBB/source/containers/concurrent_hash_map_cls/construct_destroy_copy.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -13,7 +13,7 @@ Empty container constructors concurrent_hash_map(); - explicit concurrent_hash_map( const HashCompare& compare, + explicit concurrent_hash_map( const hash_compare_type& compare, const allocator_type& alloc = allocator_type() ); explicit concurrent_hash_map( const allocator_type& alloc ); @@ -28,7 +28,7 @@ Empty container constructors .. code:: cpp - concurrent_hash_map( size_type n, const HashCompare& compare, + concurrent_hash_map( size_type n, const hash_compare_type& compare, const allocator_type& alloc = allocator_type() ); concurrent_hash_map( size_type n, const allocator_type& alloc = allocator_type() ); @@ -45,7 +45,7 @@ Constructors from the sequence of elements template concurrent_hash_map( InputIterator first, InputIterator last, - const HashCompare& compare, + const hash_compare_type& compare, const allocator_type& alloc = allocator_type() ); template @@ -70,7 +70,7 @@ Constructors from the sequence of elements .. code:: cpp concurrent_hash_map( std::initializer_list init, - const HashCompare& compare, + const hash_compare_type& compare = hash_compare_type(), const allocator_type& alloc = allocator_type() ); Equivalent to ``concurrent_hash_map(init.begin(), init.end(), compare, alloc)``. @@ -80,7 +80,7 @@ Constructors from the sequence of elements .. code:: cpp concurrent_hash_map( std::initializer_list init, - const allocator_type& alloc = allocator_type() ); + const allocator_type& alloc ); Equivalent to ``concurrent_hash_map(init.begin(), init.end(), alloc)``. diff --git a/source/elements/oneTBB/source/containers/concurrent_hash_map_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_hash_map_cls/deduction_guides.rst index d7ced326e..0f7323526 100644 --- a/source/elements/oneTBB/source/containers/concurrent_hash_map_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_hash_map_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,51 +6,50 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_hash_map`` support -class template argument deduction (since C++17): +If possible, ``concurrent_hash_map`` 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_hash_map( InputIterator, InputIterator, - const HashCompare&, - const Allocator& = Allocator() ) + HashCompare = HashCompare(), + Allocator = Allocator() ) -> concurrent_hash_map, iterator_mapped_t, HashCompare, Allocator>; template >> - concurrent_hash_map( InputIterator, InputIterator, - const Allocator& = Allocator() ) + typename Allocator> + concurrent_hash_map( InputIterator, InputIterator, Allocator ) -> concurrent_hash_map, iterator_mapped_t, tbb_hash_compare>, Allocator>; - template >, typename Allocator = tbb_allocator>> - concurrent_hash_map( std::initializer_list>, - const HashCompare&, - const Allocator& = Allocator() ) - -> concurrent_hash_map>, + HashCompare = HashCompare(), + Allocator = Allocator() ) + -> concurrent_hash_map, T, HashCompare, Allocator>; - template >> - concurrent_hash_map( std::initializer_list>, - const Allocator& = Allocator() ) - -> concurrent_hash_map + concurrent_hash_map( std::initializer_list>, + Allocator ) + -> concurrent_hash_map, T, - tbb_hash_compare, + tbb_hash_compare>, Allocator>; Where the type aliases ``iterator_key_t``, ``iterator_mapped_t``, and ``iterator_alloc_value_t`` @@ -68,6 +67,12 @@ are defined as follows: 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 ``HashCompare`` type does not meet the ``Allocator`` requirements. + **Example** .. code:: cpp diff --git a/source/elements/oneTBB/source/containers/concurrent_map_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_map_cls/deduction_guides.rst index 82d46a827..3feeedf0b 100644 --- a/source/elements/oneTBB/source/containers/concurrent_map_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_map_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,15 +6,19 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_map`` support class template argument -deduction (since C++17): +If possible, ``concurrent_map`` 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_map( InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator() ) + concurrent_map( InputIterator, InputIterator, + Compare = Compare(), + Allocator = Allocator() ) -> concurrent_map, iterator_mapped_t, Compare, @@ -22,24 +26,31 @@ deduction (since C++17): template - concurrent_map( InputIterator, InputIterator, Allocator ) + concurrent_map( InputIterator, InputIterator, + Allocator ) -> concurrent_map, iterator_mapped_t, std::less>, Allocator>; - template , + template >, typename Allocator = tbb_allocator>> - concurrent_map( std::initializer_list>, Compare = Compare(), Allocator = Allocator() ) - -> concurrent_map; + concurrent_map( std::initializer_list>, + Compare = Compare(), + Allocator = Allocator() ) + -> concurrent_map, + T, + Compare, + Allocator>; - template concurrent_map( std::initializer_list>, Allocator ) - -> concurrent_map, Allocator>; + -> concurrent_map, + T, + std::less>, + Allocator>; where the type aliases ``iterator_key_t``, ``iterator_mapped_t``, ``iterator_alloc_value_t`` are defined as follows: @@ -55,6 +66,12 @@ where the type aliases ``iterator_key_t``, ``iterator_mapped_t``, ``iterator_all 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 diff --git a/source/elements/oneTBB/source/containers/concurrent_multimap_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_multimap_cls/deduction_guides.rst index f2c251d80..104562a27 100644 --- a/source/elements/oneTBB/source/containers/concurrent_multimap_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_multimap_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,15 +6,19 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_multimap`` support class template argument -deduction (since C++17): +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( InputIterator, InputIterator, + Compare = Compare(), + Allocator = Allocator() ) -> concurrent_multimap, iterator_mapped_t, Compare, @@ -22,24 +26,31 @@ deduction (since C++17): template - concurrent_multimap( InputIterator, InputIterator, Allocator ) + concurrent_multimap( InputIterator, InputIterator, + Allocator ) -> concurrent_multimap, iterator_mapped_t, std::less>, Allocator>; - template , + template >, typename Allocator = tbb_allocator>> - concurrent_multimap( std::initializer_list>, Compare = Compare(), Allocator = Allocator() ) - -> concurrent_multimap; + concurrent_multimap( std::initializer_list>, + Compare = Compare(), + Allocator = Allocator() ) + -> concurrent_multimap, + T, + Compare, + Allocator>; - template concurrent_multimap( std::initializer_list>, Allocator ) - -> concurrent_multimap, 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: @@ -55,6 +66,12 @@ where the type aliases ``iterator_key_t``, ``iterator_mapped_t``, ``iterator_all 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 diff --git a/source/elements/oneTBB/source/containers/concurrent_multiset_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_multiset_cls/deduction_guides.rst index 5dec4d2c2..0340ec8d8 100644 --- a/source/elements/oneTBB/source/containers/concurrent_multiset_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_multiset_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,36 +6,48 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_multiset`` support class template argument -deduction (since C++17): +If possible, ``concurrent_multiset`` 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_multiset( InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator() ) + typename Allocator = tbb::tbb_allocator>> + concurrent_multiset( InputIterator, InputIterator, + Compare = Compare(), + Allocator = Allocator() ) -> concurrent_multiset, Compare, Allocator>; template - concurrent_multiset( InputIterator, InputIterator, Allocator ) + concurrent_multiset( InputIterator, InputIterator, + Allocator ) -> concurrent_multiset, - std::less>, + std::less>, Allocator>; - template , - typename Allocator = tbb_allocator> - concurrent_multiset( std::initializer_list, Compare = Compare(), Allocator = Allocator() ) - -> concurrent_multiset; + template , + typename Allocator = tbb::tbb_allocator> + concurrent_multiset( std::initializer_list, + Compare = Compare(), + Allocator = Allocator() ) + -> concurrent_multiset; - template - concurrent_multiset( std::initializer_list, Allocator ) - -> concurrent_multiset, Allocator>; + concurrent_multiset( std::initializer_list, + Allocator ) + -> concurrent_multiset, + Allocator>; Where the type alias ``iterator_value_t`` is defined as follows: @@ -44,6 +56,12 @@ Where the type alias ``iterator_value_t`` is defined as follows: template using iterator_value_t = typename std::iterator_traits::value_type; +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 diff --git a/source/elements/oneTBB/source/containers/concurrent_priority_queue_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_priority_queue_cls/deduction_guides.rst index d6bb0be1a..75b9e09b1 100644 --- a/source/elements/oneTBB/source/containers/concurrent_priority_queue_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_priority_queue_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,47 +6,48 @@ Deduction guides ================ -Where possible, constructors of ``tbb::concurrent_priority_queue`` support class template argument -deduction (since C++17): +If possible, ``concurrent_priority_queue`` 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 - concurrent_priority_queue( InputIterator, InputIterator) - -> concurrent_priority_queue>>; - - template - concurrent_priority_queue( InputIterator, InputIterator, const Compare& ) - -> concurrent_priority_queue, - Compare>; - - template - concurrent_priority_queue( InputIterator, InputIterator, const Allocator& alloc ) + template >, + typename Allocator = tbb::cache_aligned_allocator>> + concurrent_priority_queue( InputIterator, InputIterator, + Compare = Compare(), + Allocator = Allocator() ) -> concurrent_priority_queue, - std::less, + Compare, Allocator>; - template - concurrent_priority_queue( InputIterator, InputIterator, const Compare&, - const Allocator& ) + template + concurrent_priority_queue( InputIterator, InputIterator, + Allocator ) -> concurrent_priority_queue, - Compare, Allocator>; - - template - concurrent_priority_queue( std::initializer_list ) - -> concurrent_priority_queue; - - template - concurrent_priority_queue( std::initializer_list, const Compare& ) - -> concurrent_priority_queue; + std::less>, + Allocator>; - template - concurrent_priority_queue( std::initializer_list, const Allocator& ) - -> concurrent_priority_queue, Allocator>; + template , + typename Allocator = tbb::cache_aligned_allocator> + concurrent_priority_queue( std::initializer_list, + Compare = Compare(), + Allocator = Allocator() ) + -> concurrent_priority_queue; - template - concurrent_priority_queue( std::initializer_list, const Compare&, const Allocator& ) - -> concurrent_priority_queue; + template + concurrent_priority_queue( std::initializer_list, + Allocator ) + -> concurrent_priority_queue, + Allocator>; Where the type alias ``iterator_value_t`` is defined as follows: @@ -55,6 +56,12 @@ Where the type alias ``iterator_value_t`` is defined as follows: template using iterator_value_t = typename std::iterator_traits::value_type; +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 @@ -62,13 +69,13 @@ Where the type alias ``iterator_value_t`` is defined as follows: #include #include #include - + int main() { std::vector vec; - + // Deduces cpq1 as tbb::concurrent_priority_queue tbb::concurrent_priority_queue cpq1(vec.begin(), vec.end()); - + // Deduces cpq2 as tbb::concurrent_priority_queue tbb::concurrent_priority_queue cpq2(vec.begin(), vec.end(), std::greater{}); } diff --git a/source/elements/oneTBB/source/containers/concurrent_queue_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_queue_cls/deduction_guides.rst index bfda4350b..458d55499 100644 --- a/source/elements/oneTBB/source/containers/concurrent_queue_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_queue_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,15 +6,19 @@ Deduction guides ================ -Where possible, constructors of ``tbb::concurrent_queue`` support class template argument -deduction (since C++17): +If possible, ``concurrent_queue`` 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 guide is provided: .. code:: cpp template > - concurrent_queue( InputIterator, InputIterator, const Allocator& = Allocator() ) - -> concurrent_queue, Allocator>; + typename Allocator = tbb::cache_aligned_allocator> + concurrent_queue( InputIterator, InputIterator, + Allocator = Allocator() ) + -> concurrent_queue, + Allocator>; Where the type alias ``iterator_value_t`` is defined as follows: @@ -23,6 +27,11 @@ Where the type alias ``iterator_value_t`` is defined as follows: template using iterator_value_t = typename std::iterator_traits::value_type; +This deduction guide only participates 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. + **Example** .. code:: cpp diff --git a/source/elements/oneTBB/source/containers/concurrent_set_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_set_cls/deduction_guides.rst index 471243e78..5788d881d 100644 --- a/source/elements/oneTBB/source/containers/concurrent_set_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_set_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,36 +6,48 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_set`` support class template argument -deduction (since C++17): +If possible, ``concurrent_set`` 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_set( InputIterator, InputIterator, Compare = Compare(), Allocator = Allocator() ) + typename Allocator = tbb::tbb_allocator>> + concurrent_set( InputIterator, InputIterator, + Compare = Compare(), + Allocator = Allocator() ) -> concurrent_set, Compare, Allocator>; template - concurrent_set( InputIterator, InputIterator, Allocator ) + concurrent_set( InputIterator, InputIterator, + Allocator ) -> concurrent_set, - std::less>, + std::less>, Allocator>; - template , - typename Allocator = tbb_allocator> - concurrent_set( std::initializer_list, Compare = Compare(), Allocator = Allocator() ) - -> concurrent_set; + template , + typename Allocator = tbb::tbb_allocator> + concurrent_set( std::initializer_list, + Compare = Compare(), + Allocator = Allocator() ) + -> concurrent_set; - template - concurrent_set( std::initializer_list, Allocator ) - -> concurrent_set, Allocator>; + concurrent_set( std::initializer_list, + Allocator ) + -> concurrent_set, + Allocator>; Where the type alias ``iterator_value_t`` is defined as follows: @@ -44,6 +56,12 @@ Where the type alias ``iterator_value_t`` is defined as follows: template using iterator_value_t = typename std::iterator_traits::value_type; +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 diff --git a/source/elements/oneTBB/source/containers/concurrent_unordered_map_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_unordered_map_cls/deduction_guides.rst index 8e93330a1..63ec6fd68 100644 --- a/source/elements/oneTBB/source/containers/concurrent_unordered_map_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_unordered_map_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,65 +6,64 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_unordered_map`` support -class template argument deduction (since C++17): +If possible, ``concurrent_unordered_map`` 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 KeyEqual = std::equal_to>, - typename Allocator = tbb_allocator>> + typename Allocator = tbb::tbb_allocator>> concurrent_unordered_map( InputIterator, InputIterator, - map_size_type = /*implementation_defined*/, - Hash = Hash(), KeyEqual = KeyEqual(), + map_size_type = {}, + Hash = Hash(), + KeyEqual = KeyEqual(), Allocator = Allocator() ) -> concurrent_unordered_map, iterator_mapped_t, - Hash, KeyEqual, Allocator>; + Hash, + KeyEqual, + Allocator>; template concurrent_unordered_map( InputIterator, InputIterator, map_size_type, + Hash, Allocator ) -> concurrent_unordered_map, iterator_mapped_t, - std::hash>, - std::equal_to>, - Allocator>; - - template - concurrent_unordered_map( InputIterator, InputIterator, Allocator ) - -> concurrent_unordered_map, - iterator_mapped_t, - std::hash>, + Hash, std::equal_to>, Allocator>; template concurrent_unordered_map( InputIterator, InputIterator, - Hash, Allocator ) + map_size_type, + Allocator ) -> concurrent_unordered_map, iterator_mapped_t, - Hash, + std::hash>, std::equal_to>, Allocator>; template , - typename KeyEqual = std::equal_to, - typename Allocator = tbb_allocator>> - concurrent_unordered_map( std::initializer_list, - map_size_type = /*implementation-defined*/, + typename Hash = std::hash>, + typename KeyEqual = std::equal_to>, + typename Allocator = tbb::tbb_allocator>> + concurrent_unordered_map( std::initializer_list>, + map_size_type = {}, Hash = Hash(), KeyEqual = KeyEqual(), Allocator = Allocator() ) - -> concurrent_unordered_map concurrent_unordered_map, + T, Hash, KeyEqual, Allocator>; @@ -72,25 +71,41 @@ class template argument deduction (since C++17): template - concurrent_unordered_map( std::initializer_list, - map_size_type, Allocator ) - -> concurrent_unordered_map, - std::equal_to, + concurrent_unordered_map( std::initializer_list>, + map_size_type, + Allocator ) + -> concurrent_unordered_map, + T, + std::hash>, + std::equal_to>, + Allocator>; + + template + concurrent_unordered_map( std::initializer_list>, + Allocator ) + -> concurrent_unordered_map, + T, + std::hash>, + std::equal_to>, Allocator>; template - concurrent_unordered_map( std::initializer_list, - map_size_type, Hash, Allocator ) - -> concurrent_unordered_map>, + map_size_type, + Hash, + Allocator ) + -> concurrent_unordered_map, + T, Hash, - std::equal_to, + std::equal_to>, Allocator>; -where the type ``map_size_type`` refers to the ``size_type`` member type of the deduced ``concurrent_unordered_map`` +Where the ``map_size_type`` type refers to the ``size_type`` member type of the deduced ``concurrent_unordered_map`` and the type aliases ``iterator_key_t``, ``iterator_mapped_t``, and ``iterator_alloc_value_t`` are defined as follows: @@ -106,6 +121,13 @@ are defined as follows: 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 ``Hash`` type does not meet the ``Allocator`` requirements. +* The ``KeyEqual`` type does not meet the ``Allocator`` requirements. + **Example** .. code:: cpp diff --git a/source/elements/oneTBB/source/containers/concurrent_unordered_multimap_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_unordered_multimap_cls/deduction_guides.rst index 8ce342632..37bef2dfa 100644 --- a/source/elements/oneTBB/source/containers/concurrent_unordered_multimap_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_unordered_multimap_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,65 +6,64 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_unordered_multimap`` support -class template argument deduction (since C++17): +If possible, ``concurrent_unordered_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 KeyEqual = std::equal_to>, - typename Allocator = tbb_allocator>> + typename Allocator = tbb::tbb_allocator>> concurrent_unordered_multimap( InputIterator, InputIterator, - map_size_type = /*implementation_defined*/, - Hash = Hash(), KeyEqual = KeyEqual(), + map_size_type = {}, + Hash = Hash(), + KeyEqual = KeyEqual(), Allocator = Allocator() ) -> concurrent_unordered_multimap, iterator_mapped_t, - Hash, KeyEqual, Allocator>; - - template - concurrent_unordered_multimap( InputIterator, InputIterator, - map_size_type, - Allocator ) - -> concurrent_unordered_multimap, - iterator_mapped_t, - std::hash>, - std::equal_to>, + Hash, + KeyEqual, Allocator>; template - concurrent_unordered_multimap( InputIterator, InputIterator, Allocator ) + concurrent_unordered_multimap( InputIterator, InputIterator, + map_size_type, + Hash, + Allocator ) -> concurrent_unordered_multimap, iterator_mapped_t, - std::hash>, + Hash, std::equal_to>, Allocator>; template concurrent_unordered_multimap( InputIterator, InputIterator, - Hash, Allocator ) + map_size_type, + Allocator ) -> concurrent_unordered_multimap, iterator_mapped_t, - Hash, + std::hash>, std::equal_to>, Allocator>; template , - typename KeyEqual = std::equal_to, - typename Allocator = tbb_allocator>> - concurrent_unordered_multimap( std::initializer_list, - map_size_type = /*implementation-defined*/, + typename Hash = std::hash>, + typename KeyEqual = std::equal_to>, + typename Allocator = tbb::tbb_allocator>> + concurrent_unordered_multimap( std::initializer_list>, + map_size_type = {}, Hash = Hash(), KeyEqual = KeyEqual(), Allocator = Allocator() ) - -> concurrent_unordered_multimap concurrent_unordered_multimap, + T, Hash, KeyEqual, Allocator>; @@ -72,26 +71,42 @@ class template argument deduction (since C++17): template - concurrent_unordered_multimap( std::initializer_list, - map_size_type, Allocator ) - -> concurrent_unordered_multimap, - std::equal_to, + concurrent_unordered_multimap( std::initializer_list>, + map_size_type, + Allocator ) + -> concurrent_unordered_multimap, + T, + std::hash>, + std::equal_to>, + Allocator>; + + template + concurrent_unordered_multimap( std::initializer_list>, + Allocator ) + -> concurrent_unordered_multimap, + T, + std::hash>, + std::equal_to>, Allocator>; template - concurrent_unordered_multimap( std::initializer_list, - map_size_type, Hash, Allocator ) - -> concurrent_unordered_multimap>, + map_size_type, + Hash, + Allocator ) + -> concurrent_unordered_multimap, + T, Hash, - std::equal_to, + std::equal_to>, Allocator>; -Where the type ``map_size_type`` refers to the ``size_type`` member type of the deduced ``concurrent_multimap`` -and the type aliases ``iterator_key_t``, ``iterator_mapped_t`` and ``iterator_alloc_value_t`` +Where the ``map_size_type`` type refers to the ``size_type`` member type of the deduced ``concurrent_unordered_multimap`` +and the type aliases ``iterator_key_t``, ``iterator_mapped_t``, and ``iterator_alloc_value_t`` are defined as follows: .. code:: cpp @@ -104,7 +119,14 @@ are defined as follows: template using iterator_alloc_value_t = std::pair, - iterator_mapped_t>>; + 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 ``Hash`` type does not meet the ``Allocator`` requirements. +* The ``KeyEqual`` type does not meet the ``Allocator`` requirements. **Example** diff --git a/source/elements/oneTBB/source/containers/concurrent_unordered_multiset_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_unordered_multiset_cls/deduction_guides.rst index 8cdc1ffa0..87710e79a 100644 --- a/source/elements/oneTBB/source/containers/concurrent_unordered_multiset_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_unordered_multiset_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,56 +6,43 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_unordered_multiset`` support -class template argument deduction (since C++17): +If possible, ``concurrent_unordered_multiset`` 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 KeyEqual = std::equal_to>, - typename Allocator = tbb_allocator>> + typename Allocator = tbb::tbb_allocator>> concurrent_unordered_multiset( InputIterator, InputIterator, - map_size_type = /*implementation_defined*/, - Hash = Hash(), KeyEqual = KeyEqual(), + set_size_type = {}, + Hash = Hash(), + KeyEqual = KeyEqual(), Allocator = Allocator() ) -> concurrent_unordered_multiset, - Hash, KeyEqual, Allocator>; + Hash, + KeyEqual, + Allocator>; template concurrent_unordered_multiset( InputIterator, InputIterator, - map_size_type, + set_size_type, Allocator ) -> concurrent_unordered_multiset, std::hash>, std::equal_to>, Allocator>; - template - concurrent_unordered_multiset( InputIterator, InputIterator, Allocator ) - -> concurrent_unordered_multiset, - std::hash>, - std::equal_to>, - Allocator>; - - template - concurrent_unordered_multiset( InputIterator, InputIterator, - Hash, Allocator ) - -> concurrent_unordered_multiset, - Hash, - std::equal_to>, - Allocator>; - template , - typename KeyEqual = std::equal_to, - typename Allocator = tbb_allocator>> - concurrent_unordered_multiset( std::initializer_list, - map_size_type = /*implementation-defined*/, + typename Hash = std::hash, + typename KeyEqual = std::equal_to, + typename Allocator = tbb::tbb_allocator> + concurrent_unordered_multiset( std::initializer_list, + set_size_type = {}, Hash = Hash(), KeyEqual = KeyEqual(), Allocator = Allocator() ) @@ -66,24 +53,36 @@ class template argument deduction (since C++17): template - concurrent_unordered_multiset( std::initializer_list, - map_size_type, Allocator ) + concurrent_unordered_multiset( std::initializer_list, + set_size_type, + Allocator ) -> concurrent_unordered_multiset, - std::equal_to, + std::hash, + std::equal_to, + Allocator>; + + template + concurrent_unordered_multiset( std::initializer_list, + Allocator ) + -> concurrent_unordered_multiset, + std::equal_to, Allocator>; template - concurrent_unordered_multiset( std::initializer_list, - map_size_type, Hash, Allocator ) + concurrent_unordered_multiset( std::initializer_list, + set_size_type, + Hash, + Allocator ) -> concurrent_unordered_multiset, + std::equal_to, Allocator>; -where the type ``map_size_type`` refers to the ``size_type`` member type of the deduced ``concurrent_unordered_multiset`` +Where the ``set_size_type`` type refers to the ``size_type`` member type of the deduced ``concurrent_unordered_multiset`` and the type alias ``iterator_value_t`` is defined as follows: .. code:: cpp @@ -91,6 +90,13 @@ and the type alias ``iterator_value_t`` is defined as follows: template using iterator_value_t = typename std::iterator_traits::value_type; +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 ``Hash`` type does not meet the ``Allocator`` requirements. +* The ``KeyEqual`` type does not meet the ``Allocator`` requirements. + **Example** .. code:: cpp diff --git a/source/elements/oneTBB/source/containers/concurrent_unordered_set_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_unordered_set_cls/deduction_guides.rst index 9c877cbfa..791e923c2 100644 --- a/source/elements/oneTBB/source/containers/concurrent_unordered_set_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_unordered_set_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,56 +6,43 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_unordered_set`` support -class template argument deduction (since C++17): +If possible, ``concurrent_unordered_set`` 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 KeyEqual = std::equal_to>, - typename Allocator = tbb_allocator>> + typename Allocator = tbb::tbb_allocator>> concurrent_unordered_set( InputIterator, InputIterator, - map_size_type = /*implementation_defined*/, - Hash = Hash(), KeyEqual = KeyEqual(), + set_size_type = {}, + Hash = Hash(), + KeyEqual = KeyEqual(), Allocator = Allocator() ) -> concurrent_unordered_set, - Hash, KeyEqual, Allocator>; + Hash, + KeyEqual, + Allocator>; template concurrent_unordered_set( InputIterator, InputIterator, - map_size_type, + set_size_type, Allocator ) -> concurrent_unordered_set, std::hash>, std::equal_to>, Allocator>; - template - concurrent_unordered_set( InputIterator, InputIterator, Allocator ) - -> concurrent_unordered_set, - std::hash>, - std::equal_to>, - Allocator>; - - template - concurrent_unordered_set( InputIterator, InputIterator, - Hash, Allocator ) - -> concurrent_unordered_set, - Hash, - std::equal_to>, - Allocator>; - template , - typename KeyEqual = std::equal_to, - typename Allocator = tbb_allocator>> - concurrent_unordered_set( std::initializer_list, - map_size_type = /*implementation-defined*/, + typename Hash = std::hash, + typename KeyEqual = std::equal_to, + typename Allocator = tbb::tbb_allocator> + concurrent_unordered_set( std::initializer_list, + set_size_type = {}, Hash = Hash(), KeyEqual = KeyEqual(), Allocator = Allocator() ) @@ -66,24 +53,36 @@ class template argument deduction (since C++17): template - concurrent_unordered_set( std::initializer_list, - map_size_type, Allocator ) + concurrent_unordered_set( std::initializer_list, + set_size_type, + Allocator ) -> concurrent_unordered_set, - std::equal_to, + std::hash, + std::equal_to, + Allocator>; + + template + concurrent_unordered_set( std::initializer_list, + Allocator ) + -> concurrent_unordered_set, + std::equal_to, Allocator>; template - concurrent_unordered_set( std::initializer_list, - map_size_type, Hash, Allocator ) + concurrent_unordered_set( std::initializer_list, + set_size_type, + Hash, + Allocator ) -> concurrent_unordered_set, + std::equal_to, Allocator>; -Where the type ``map_size_type`` refers to the ``size_type`` member type of the deduced ``concurrent_unordered_set`` +Where the ``set_size_type`` type refers to the ``size_type`` member type of the deduced ``concurrent_unordered_set`` and the type alias ``iterator_value_t`` is defined as follows: .. code:: cpp @@ -91,6 +90,13 @@ and the type alias ``iterator_value_t`` is defined as follows: template using iterator_value_t = typename std::iterator_traits::value_type; +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 ``Hash`` type does not meet the ``Allocator`` requirements. +* The ``KeyEqual`` type does not meet the ``Allocator`` requirements. + **Example** .. code:: cpp diff --git a/source/elements/oneTBB/source/containers/concurrent_vector_cls/deduction_guides.rst b/source/elements/oneTBB/source/containers/concurrent_vector_cls/deduction_guides.rst index eb7ecf8ba..807ac6986 100644 --- a/source/elements/oneTBB/source/containers/concurrent_vector_cls/deduction_guides.rst +++ b/source/elements/oneTBB/source/containers/concurrent_vector_cls/deduction_guides.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: 2019-2020 Intel Corporation +.. SPDX-FileCopyrightText: 2019-2021 Intel Corporation .. .. SPDX-License-Identifier: CC-BY-4.0 @@ -6,15 +6,20 @@ Deduction guides ================ -Where possible, constructors of ``concurrent_vector`` support -class template argument deduction (since C++17): +If possible, ``concurrent_vector`` constructors support class template argument deduction (since C++17). +The following constructors provide implicitly-generated deduction guides: + +* Copy and move constructors, including constructors with explicit ``allocator_type`` argument +* Constructors, accepting ``std::initializer_list`` as an argument + +In addition, the following explicit deduction guide is provided: .. code:: cpp template >> + typename Allocator = tbb::cache_aligned_allocator>> concurrent_vector( InputIterator, InputIterator, - const Allocator& = Allocator() ) + Allocator = Allocator() ) -> concurrent_vector, Allocator>; @@ -25,6 +30,11 @@ Where type alias ``iterator_value_t`` defines as follows: template using iterator_value_t = typename std::iterator_traits::value_type; +This deduction guide 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. + **Example** .. code:: cpp @@ -43,4 +53,4 @@ Where type alias ``iterator_value_t`` defines as follows: // Deduces cv2 as tbb::concurrent_vector> tbb::concurrent_vector cv2(arr.begin(), arr.end(), alloc); - } \ No newline at end of file + }