名前空間
変種
操作

std::uses_allocator<std::flat_multimap>

From cppreference.com
 
 
 
 
ヘッダ <flat_map> で定義
template< class Key, class T, class Compare,

          class KeyContainer, class MappedContainer, class Allocator >
struct uses_allocator<std::flat_multimap<Key, T, Compare,
                      KeyContainer, MappedContainer>, Allocator>
    : std::bool_constant<std::uses_allocator_v<KeyContainer, Allocator> &&

                         std::uses_allocator_v<MappedContainer, Allocator>> {};
(C++23から)

std::uses_allocator 型特性に対する std::flat_multimap の透過的な特殊化を提供します。コンテナアダプタは、基盤となるコンテナがアロケータを使用する場合にのみ、アロケータを使用します。

目次

std::integral_constant から継承

メンバ定数

value
[static]
true
(公開静的メンバ定数)

メンバ関数

operator bool
オブジェクトを bool に変換し、value を返します。
(public member function)
operator()
(C++14)
value を返します。
(public member function)

メンバ型

定義
value_type bool
type std::integral_constant<bool, value>

[編集]

#include <memory>
#include <flat_map>
 
static_assert(
    std::uses_allocator<std::flat_multimap<int, int>, void>::value == false &&
    std::uses_allocator<std::flat_multimap<int, int>, std::allocator<int>>::value == true
);
 
int main() {}

[編集] 関連項目

指定された型が uses-allocator 構築をサポートしているかどうかをチェックします
(クラステンプレート) [編集]
English 日本語 中文(简体) 中文(繁體)