名前空間
変種
操作

std::flat_multiset の推論ガイド

From cppreference.com
 
 
 
 
ヘッダ <flat_set> で定義
template< class KeyContainer,

          class Compare = std::less<typename KeyContainer::value_type> >
flat_multiset( KeyContainer, Compare = Compare() )

    -> flat_multiset<typename KeyContainer::value_type, Compare, KeyContainer>;
(1) (C++23から)
template< class KeyContainer, class Allocator >

flat_multiset( KeyContainer, Allocator )
    -> flat_multiset<typename KeyContainer::value_type,

                     std::less<typename KeyContainer::value_type>, KeyContainer>;
(2) (C++23から)
template< class KeyContainer, class Compare, class Allocator >

flat_multiset( KeyContainer, Compare, Allocator )

    -> flat_multiset<typename KeyContainer::value_type, Compare, KeyContainer>;
(3) (C++23から)
template< class KeyContainer,

          class Compare = std::less<typename KeyContainer::value_type> >
flat_multiset( std::sorted_equivalent_t, KeyContainer, Compare = Compare() )

    -> flat_multiset<typename KeyContainer::value_type, Compare, KeyContainer>;
(4) (C++23から)
template< class KeyContainer, class Allocator >

flat_multiset( std::sorted_equivalent_t, KeyContainer, Allocator )
    -> flat_multiset<typename KeyContainer::value_type,

                     std::less<typename KeyContainer::value_type>, KeyContainer>;
(5) (C++23から)
template< class KeyContainer, class Compare, class Allocator >

flat_multiset( std::sorted_equivalent_t, KeyContainer, Compare, Allocator )

    -> flat_multiset<typename KeyContainer::value_type, Compare, KeyContainer>;
(6) (C++23から)
template< class InputIter,

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

    -> flat_multiset</*iter-value-type*/<InputIter>, Compare>;
(7) (C++23から)
template< class InputIter,

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

    -> flat_multiset</*iter-value-type*/<InputIter>, Compare>;
(8) (C++23から)
template< ranges::input_range R,

          class Compare = std::less<ranges::range_value_t<R>>,
          class Allocator = std::allocator<ranges::range_value_t<R>> >
flat_multiset( std::from_range_t, R&&, Compare = Compare(), Allocator = Allocator() )
    -> flat_multiset<ranges::range_value_t<R>, Compare,
                     std::vector<ranges::range_value_t<R>,

                     /*alloc-rebind*/<Allocator, ranges::range_value_t<R>>>>;
(9) (C++23から)
template< ranges::input_range R, class Allocator >

flat_multiset( std::from_range_t, R&&, Allocator )
    -> flat_multiset<ranges::range_value_t<R>, std::less<ranges::range_value_t<R>>,
                     std::vector<ranges::range_value_t<R>,

                     /*alloc-rebind*/<Allocator, ranges::range_value_t<R>>>>;
(10) (C++23から)
template< class Key, class Compare = std::less<Key> >

flat_multiset( std::initializer_list<Key>, Compare = Compare() )

    -> flat_multiset<Key, Compare>;
(11) (C++23から)
template< class Key, class Compare = std::less<Key> >

flat_multiset( std::sorted_equivalent_t,
               std::initializer_list<Key>, Compare = Compare() )

    -> flat_multiset<Key, Compare>;
(12) (C++23から)

これらの 推論ガイド は、 からの推論を可能にするために提供されています。

1) コンテナとコンパレータ。
2) コンテナとアロケータ。
3) コンテナ、コンパレータ、アロケータ。
4) std::sorted_equivalent_t タグ、コンテナ、コンパレータ。
5) std::sorted_equivalent_t タグ、コンテナ、アロケータ。
6) std::sorted_equivalent_t タグ、コンテナ、コンパレータ、アロケータ。
イテレータ範囲とコンパレータ。
std::sorted_equivalent_t タグ、イテレータ範囲、コンパレータ。
std::from_range_t タグ、input_range、コンパレータ、アロケータ。
std::from_range_t タグ、input_range、アロケータ。
std::initializer_list とコンパレータ。
std::sorted_equivalent_t タグ、std::initializer_list、コンパレータ。

これらのオーバーロードは、InputItLegacyInputIterator を満たし、AllocAllocator を満たし、CompAllocator を満たさない場合にのみ、オーバーロード解決に参加します。

注意:ライブラリが型を LegacyInputIterator を満たさないと判断する程度は未指定ですが、最低限、整数型は入力イテレータとして適格ではないことが挙げられます。同様に、ライブラリが型を Allocator を満たさないと判断する程度は未指定ですが、最低限、メンバ型 Alloc::value_type が存在し、式 std::declval<Alloc&>().allocate(std::size_t{}) が評価されないオペランドとして扱われる場合に、well-formed である必要があります。

[編集]

English 日本語 中文(简体) 中文(繁體)