Namensräume
Varianten
Aktionen

deduction guides for std::flat_multimap

Von cppreference.com
 
 
 
 
Definiert in Header <flat_map>
template< class KeyContainer, class MappedContainer,

          class Compare = std::less<typename KeyContainer::value_type> >
flat_multimap( KeyContainer, MappedContainer, Compare = Compare() )
    -> flat_multimap<typename KeyContainer::value_type,
                     typename MappedContainer::value_type,

                     Compare, KeyContainer, MappedContainer>;
(1) (seit C++23)
template< class KeyContainer, class MappedContainer, class Allocator >

flat_multimap( KeyContainer, MappedContainer, Allocator )
    -> flat_multimap<typename KeyContainer::value_type,
                     typename MappedContainer::value_type,
                     std::less<typename KeyContainer::value_type>,

                     KeyContainer, MappedContainer>;
(2) (seit C++23)
template< class KeyContainer, class MappedContainer,

          class Compare, class Allocator >
flat_multimap( KeyContainer, MappedContainer, Compare, Allocator )
    -> flat_multimap<typename KeyContainer::value_type,
                     typename MappedContainer::value_type,

                     Compare, KeyContainer, MappedContainer>;
(3) (seit C++23)
template< class KeyContainer, class MappedContainer,

          class Compare = std::less<typename KeyContainer::value_type> >
flat_multimap( std::sorted_equivalent_t, KeyContainer, MappedContainer,
               Compare = Compare() )
    -> flat_multimap<typename KeyContainer::value_type,
                     typename MappedContainer::value_type,

                     Compare, KeyContainer, MappedContainer>;
(4) (seit C++23)
template< class KeyContainer, class MappedContainer, class Allocator >

flat_multimap( std::sorted_equivalent_t, KeyContainer, MappedContainer,
               Allocator )
    -> flat_multimap<typename KeyContainer::value_type,
                     typename MappedContainer::value_type,
                     std::less<typename KeyContainer::value_type>,

                     KeyContainer, MappedContainer>;
(5) (seit C++23)
template< class KeyContainer, class MappedContainer,

          class Compare, class Allocator>
flat_multimap( std::sorted_equivalent_t, KeyContainer, MappedContainer,
               Compare, Allocator )
    -> flat_multimap<typename KeyContainer::value_type,
                     typename MappedContainer::value_type,

                     Compare, KeyContainer, MappedContainer>;
(6) (seit C++23)
template< class InputIter,

          class Compare = std::less</*iter-key-type*/<InputIter>> >
flat_multimap( InputIter, InputIter, Compare = Compare() )
    -> flat_multimap</*iter-key-type*/<InputIter>,

                     /*iter-mapped-type*/<InputIter>, Compare>;
(7) (seit C++23)
template< class InputIter,

          class Compare = std::less</*iter-key-type*/<InputIter>> >
flat_multimap( std::sorted_equivalent_t, InputIter, InputIter,
               Compare = Compare() )
    -> flat_multimap</*iter-key-type*/<InputIter>,

                     /*iter-mapped-type*/<InputIter>, Compare>;
(8) (seit C++23)
template< ranges::input_range R,

          class Compare = std::less</*range-key-type*/<R>>,
          class Allocator = allocator<byte> >
flat_multimap( std::from_range_t, R&&, Compare = Compare(),
               Allocator = Allocator() )
    -> flat_multimap</*range-key-type*/<R>, /*range-mapped-type*/<R>, Compare,
                     std::vector</*range-key-type*/<R>,
                                 /*alloc-rebind*/<Allocator,
                                                  /*range-key-type*/<R>>>,
                     std::vector</*range-mapped-type*/<R>,
                                 /*alloc-rebind*/<Allocator,

                                                  /*range-mapped-type*/<R>>>>;
(9) (seit C++23)
template< ranges::input_range R, class Allocator >

flat_multimap( std::from_range_t, R&&, Allocator )
    -> flat_multimap</*range-key-type*/<R>, /*range-mapped-type*/<R>,
                     std::less</*range-key-type*/<R>>,
                     std::vector</*range-key-type*/<R>,
                                 /*alloc-rebind*/<Allocator,
                                                  /*range-key-type*/<R>>>,
                     std::vector</*range-mapped-type*/<R>,
                                 /*alloc-rebind*/<Allocator,

                                                  /*range-mapped-type*/<R>>>>;
(10) (seit C++23)
template< class Key, class T, class Compare = std::less<Key> >

flat_multimap( std::initializer_list<pair<Key, T>>, Compare = Compare() )

    -> flat_multimap<Key, T, Compare>;
(11) (seit C++23)
template< class Key, class T, class Compare = std::less<Key> >

flat_multimap( std::sorted_equivalent_t, std::initializer_list<pair<Key, T>>,
               Compare = Compare() )

    -> flat_multimap<Key, T, Compare>;
(12) (seit C++23)

Diese Ableitungs-Guides werden für bereitgestellt, um die Ableitung von Folgendem zu ermöglichen:

1) Ein Key-Container, ein Mapped-Container und ein Comparator.
2) Ein Key-Container, ein Mapped-Container und ein Allocator.
3) Ein Key-Container, ein Mapped-Container, ein Comparator und ein Allocator.
4) Der Tag std::sorted_equivalent_t, ein Key-Container, ein Mapped-Container und ein Comparator.
5) Der Tag std::sorted_equivalent_t, ein Key-Container, ein Mapped-Container und ein Allocator.
6) Der Tag std::sorted_equivalent_t, ein Key-Container, ein Mapped-Container, ein Comparator und ein Allocator.
7) Ein Iterator-Bereich und ein Komparator.
8) Der Tag std::sorted_equivalent_t, ein Iterator-Bereich und ein Comparator.
9) Das Tag std::from_range_t, ein input_range, ein Komparator und ein Allokator.
10) Das Tag std::from_range_t, ein input_range und ein Allokator.
11) Die std::initializer_list und ein Komparator.
12) Der Tag std::sorted_equivalent_t, die std::initializer_list und ein Comparator.

Diese Überladungen nehmen an der Überladungsauflösung teil, nur wenn InputIt LegacyInputIterator erfüllt, Alloc Allocator erfüllt und Comp Allocator nicht erfüllt.

Hinweis: Das Ausmaß, bis zu dem die Bibliothek feststellt, dass ein Typ LegacyInputIterator nicht erfüllt, ist nicht spezifiziert, außer dass als Minimum Ganzzahltypen nicht als Eingabeiteratoren qualifizieren. Ebenso ist das Ausmaß, bis zu dem sie feststellt, dass ein Typ Allocator nicht erfüllt, nicht spezifiziert, außer dass als Minimum der Mitgliedstyp Alloc::value_type existieren muss und der Ausdruck std::declval<Alloc&>().allocate(std::size_t{}) gut gebildet sein muss, wenn er als nicht ausgewerteter Operand behandelt wird.

[bearbeiten] Beispiel