MySQL 9.6.0
Source Code Documentation
mysql::allocators Namespace Reference

Classes

class  Allocator
 Allocator using a Memory_resource to do the allocation. More...
 
class  Memory_resource
 Polymorphism-free memory resource class with custom allocator and deallocator functions. More...
 

Functions

template<class T >
bool operator== (const Allocator< T > &a1, const Allocator< T > &a2)
 Compare two Allocator objects for equality. More...
 
template<class T >
bool operator!= (const Allocator< T > &a1, const Allocator< T > &a2)
 Compare two Allocator objects for inequality. More...
 
decltype(auto) get_memory_resource_or_default (const auto &object)
 Return object.get_memory_resource(), if that function exists. More...
 

Function Documentation

◆ get_memory_resource_or_default()

decltype(auto) mysql::allocators::get_memory_resource_or_default ( const auto &  object)

Return object.get_memory_resource(), if that function exists.

Otherwise, returns a default-constructed Memory_resource.

This may be useful to implement get_memory_resource() in class templates, when the returned object is retrieved from a member object of a template type that may or may not have a get_memory_resource() member function.

◆ operator!=()

template<class T >
bool mysql::allocators::operator!= ( const Allocator< T > &  a1,
const Allocator< T > &  a2 
)

Compare two Allocator objects for inequality.

◆ operator==()

template<class T >
bool mysql::allocators::operator== ( const Allocator< T > &  a1,
const Allocator< T > &  a2 
)

Compare two Allocator objects for equality.