xtd 0.2.0
Loading...
Searching...
No Matches

Definition

Contains helpers generic collections definitions.

Classes

struct  xtd::collections::generic::helpers::comparer< type_t >
 Implements a function object for compare data. More...
 
struct  xtd::collections::generic::helpers::equator< key_t >
 Implements a function object for performing comparisons. Unless specialised, invokes operator== on type type_t. xtd::equator with the key and the value strongly typed to be std::any. More...
 
struct  xtd::collections::generic::helpers::hasher< key_t >
 Implements a function object for hashing data. More...
 

Typedefs

template<typename type_t >
using xtd::collections::generic::helpers::allocator = std::allocator< type_t >
 Represent an allocator alias.
 

Typedef Documentation

◆ allocator

template<typename type_t >
using xtd::collections::generic::helpers::allocator = typedef std::allocator<type_t>

#include <xtd.core/include/xtd/collections/generic/helpers/allocator.hpp>

Represent an allocator alias.

Header
#include <xtd/collections/generic/allocator>
Namespace
xtd::collections
Library
xtd.core
Remarks
The xtd::collections::generic::helpers::allocator is the default allocator used by all xtd library containers if no user-specified allocator is provided.
The xtd::collections::generic::helpers::allocator is alias on std::allocator.
A simple alias for the moment, which leaves open the possibility of implementing a specific allocator for xtd if necessary in the future.
Examples
The following example show how to use xtd::collections::generic::helpers::allocator with std::vector.
auto values = std::vector<date_time, xtd::collections::generic::helpers::allocator<date_time>> {};
values.emplace_back(1971, 1, 5);