std::uses_allocator<std::flat_multiset>
From cppreference.com
< cpp | container | flat multiset
| ヘッダ <flat_set> で定義 |
||
| template< class Key, class Compare, class KeyContainer, class Allocator > struct uses_allocator<std::flat_multiset<Key, Compare, KeyContainer>, Allocator> |
(C++23から) | |
std::uses_allocator 型特性(type trait)の、std::flat_multiset に対する透過的な特殊化を提供します。これは、コンテナアダプタがアロケータを使用するのは、基底となるコンテナがアロケータを使用する場合、かつその場合に限ることを意味します。
目次 |
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_set> static_assert( std::uses_allocator<std::flat_multiset<int>, void>::value == false && std::uses_allocator<std::flat_multiset<int>, std::allocator<int>>::value == true ); int main() {}
[編集] 関連項目
| (C++11) |
指定された型が uses-allocator 構築をサポートしているかどうかをチェックします (クラステンプレート) |