Namespaces
Variants

std:: uses_allocator <std::flat_multimap>

From cppreference.net

Défini dans l'en-tête <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 >> { } ;
(depuis C++23)

Fournit une spécialisation transparente du std::uses_allocator pour std:: flat_multimap : l'adaptateur de conteneur utilise un allocateur si et seulement si le conteneur sous-jacent le fait.

Table des matières

Hérité de std:: integral_constant

Constantes membres

value
[static]
true
(constante membre publique statique)

Fonctions membres

operator bool
convertit l'objet en bool , retourne value
(fonction membre publique)
operator()
(C++14)
retourne value
(fonction membre publique)

Types membres

Type Définition
value_type bool
type std:: integral_constant < bool , value >

Exemple

#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() {}

Voir aussi

vérifie si le type spécifié prend en charge la construction avec allocateur
(modèle de classe)