Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::DefaultInitializationAllocator< T, A > Class Template Reference

#include <gromacs/utility/defaultinitializationallocator.h>

Inherits A.

Description

template<typename T, typename A = std::allocator<T>>
class gmx::DefaultInitializationAllocator< T, A >

Allocator adaptor that interposes construct() calls to convert value initialization into default initialization.

This can be used to avoid initialization e.g. on resize() in std::vector.

Public Member Functions

template<typename U >
void construct (U *ptr) noexcept(std::is_nothrow_default_constructible< U >::value)
 Constructs an object and default initializes.
 
template<typename U , typename... Args>
void construct (U *ptr, Args &&...args)
 Constructs an object and value initializes.
 

The documentation for this class was generated from the following file: