MySQL 8.4.2
Source Code Documentation
unique_ptr.h File Reference
#include <assert.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <algorithm>
#include <cstddef>
#include <iostream>
#include <limits>
#include <memory>
#include <string>
#include <tuple>
#include "my_sys.h"
#include "mysql/service_mysql_alloc.h"
#include "sql/memory/aligned_atomic.h"
#include "sql/memory/ref_ptr.h"

Go to the source code of this file.

Classes

struct  memory::is_allocator< T >
 Struct that allows for checking if T fulfills the Allocator named requirements. More...
 
class  memory::PFS_allocator< T >
 Allocator class for instrumenting allocated memory with Performance Schema keys. More...
 
class  memory::Unique_ptr< T, A >
 Smart pointer to hold a unique pointer to a heap allocated memory of type T, constructed using a specific allocator. More...
 

Namespaces

namespace  memory
 
namespace  memory::traits
 

Functions

template<class T >
auto memory::traits::test_for_allocate (int T::*) -> decltype(std::declval< T >().allocate(std::declval< size_t >()), std::true_type{})
 Tests for the existence of allocate(size_t) in order to disambiguate if T is an allocator class. More...
 
template<class >
std::false_type memory::traits::test_for_allocate (...)
 
template<typename T , std::enable_if_t< std::is_array< T >::value > * = nullptr>
Unique_ptr< T, std::nullptr_t > memory::make_unique (size_t size)
 In-place constructs a new unique pointer with no specific allocator and with array type T. More...
 
template<typename T , typename A , std::enable_if_t< std::is_array< T >::value > * = nullptr>
Unique_ptr< T, A > memory::make_unique (A &alloc, size_t size)
 In-place constructs a new unique pointer with a specific allocator and with array type T. More...
 
template<typename T , typename A , typename... Args, std::enable_if_t<!std::is_array< T >::value &&memory::is_allocator< A >::value > * = nullptr>
Unique_ptr< T, A > memory::make_unique (A &alloc, Args &&... args)
 In-place constructs a new unique pointer with a specific allocator and with non-array type T. More...
 
template<typename T , typename... Args, std::enable_if_t<!std::is_array< T >::value > * = nullptr>
Unique_ptr< T, std::nullptr_t > memory::make_unique (Args &&... args)
 In-place constructs a new unique pointer with no specific allocator and with non-array type T. More...
 
template<typename T , typename U >
bool operator== (const memory::PFS_allocator< T > &lhs, const memory::PFS_allocator< U > &rhs)
 
template<typename T , typename U >
bool operator!= (const memory::PFS_allocator< T > &lhs, const memory::PFS_allocator< U > &rhs)
 
template<typename T1 , typename A1 , typename T2 , typename A2 >
bool operator== (memory::Unique_ptr< T1, A1 > const &lhs, memory::Unique_ptr< T2, A2 > const &rhs)
 
template<typename T1 , typename A1 , typename T2 , typename A2 >
bool operator!= (memory::Unique_ptr< T1, A1 > const &lhs, memory::Unique_ptr< T2, A2 > const &rhs)
 
template<typename T1 , typename A1 >
bool operator== (memory::Unique_ptr< T1, A1 > const &lhs, std::nullptr_t)
 
template<typename T1 , typename A1 >
bool operator!= (memory::Unique_ptr< T1, A1 > const &lhs, std::nullptr_t)
 

Function Documentation

◆ operator!=() [1/3]

template<typename T , typename U >
bool operator!= ( const memory::PFS_allocator< T > &  lhs,
const memory::PFS_allocator< U > &  rhs 
)

◆ operator!=() [2/3]

template<typename T1 , typename A1 , typename T2 , typename A2 >
bool operator!= ( memory::Unique_ptr< T1, A1 > const &  lhs,
memory::Unique_ptr< T2, A2 > const &  rhs 
)

◆ operator!=() [3/3]

template<typename T1 , typename A1 >
bool operator!= ( memory::Unique_ptr< T1, A1 > const &  lhs,
std::nullptr_t   
)

◆ operator==() [1/3]

template<typename T , typename U >
bool operator== ( const memory::PFS_allocator< T > &  lhs,
const memory::PFS_allocator< U > &  rhs 
)

◆ operator==() [2/3]

template<typename T1 , typename A1 , typename T2 , typename A2 >
bool operator== ( memory::Unique_ptr< T1, A1 > const &  lhs,
memory::Unique_ptr< T2, A2 > const &  rhs 
)

◆ operator==() [3/3]

template<typename T1 , typename A1 >
bool operator== ( memory::Unique_ptr< T1, A1 > const &  lhs,
std::nullptr_t   
)