Skip to content

Latest commit

 

History

History
63 lines (48 loc) · 1.76 KB

allocator-void-class.md

File metadata and controls

63 lines (48 loc) · 1.76 KB
title ms.custom ms.date ms.reviewer ms.suite ms.technology ms.tgt_pltfrm ms.topic f1_keywords dev_langs helpviewer_keywords ms.assetid caps.latest.revision author ms.author manager
allocator<void> Class | Microsoft Docs
11/04/2016
cpp-standard-libraries
article
memory/std::allocator<void>
allocator<void>
C++
allocator<void> class
abfb40f5-c600-46a6-b130-f42c6535b2bd
18
corob-msft
corob
ghogen

allocator<void> Class

A specialization of the template class allocator to type void, defining the types that make sense in this context.

Syntax

template <>
class allocator<void> {
    typedef void *pointer;
    typedef const void *const_pointer;
    typedef void value_type;
    template <class Other>
    struct rebind;
    allocator();
    allocator(const allocator<void>&);

    template <class Other>
    allocator(const allocator<Other>&);

    template <class Other>
    allocator<void>& operator=(const allocator<Other>&);
};

Remarks

The class explicitly specializes template class allocator for type void. Its constructors and assignment operator behave the same as for the template class, but it defines only the following types:

Requirements

Header: <memory>

Namespace: std

See Also

Thread Safety in the C++ Standard Library