Blender V5.3
blender::blenlib_detail Namespace Reference

Classes

struct  AnyTypeInfo
struct  EmptyType
struct  GVArrayAnyExtraInfo
struct  NoExtraInfo
struct  ScopedDeferHelper

Typedefs

template<typename T>
using Ptr = std::unique_ptr<T>

Functions

template<size_t... I, typename... Args>
constexpr uint64_t get_default_hash_array (std::index_sequence< I... >, const Args &...args)

Variables

template<typename ExtraInfo, typename T>
AnyTypeInfo< ExtraInfo > info_for_inline
template<typename ExtraInfo, typename T>
AnyTypeInfo< ExtraInfo > info_for_unique_ptr
static constexpr std::array< uint64_t, 5 > default_hash_factors

Typedef Documentation

◆ Ptr

template<typename T>
using blender::blenlib_detail::Ptr = std::unique_ptr<T>

Used when T can't be stored directly in the inline buffer and is stored in a #std::unique_ptr instead. In this scenario, the #std::unique_ptr is stored in the inline buffer.

Definition at line 60 of file BLI_any.hh.

Function Documentation

◆ get_default_hash_array()

template<size_t... I, typename... Args>
uint64_t blender::blenlib_detail::get_default_hash_array ( std::index_sequence< I... > ,
const Args &... args )
constexpr

Definition at line 241 of file BLI_hash.hh.

References default_hash_factors, get_default_hash_array(), and I.

Referenced by blender::get_default_hash(), and get_default_hash_array().

Variable Documentation

◆ default_hash_factors

std::array<uint64_t, 5> blender::blenlib_detail::default_hash_factors
staticconstexpr
Initial value:
= {
19349669, 83492791, 3632623, 8789800933, 7235126189}

Definition at line 237 of file BLI_hash.hh.

Referenced by get_default_hash_array().

◆ info_for_inline

template<typename ExtraInfo, typename T>
AnyTypeInfo<ExtraInfo> blender::blenlib_detail::info_for_inline
inline
Initial value:
= {
+[](void *dst, const void *src) { new (dst) T(*static_cast<const T *>(src)); },
+[](void *dst, void *src) { new (dst) T(std::move(*static_cast<T *>(src))); },
+[](void *src) { std::destroy_at((static_cast<T *>(src))); },
nullptr,
ExtraInfo::template get<T>()}
#define T
constexpr bool is_trivially_move_constructible_extended_v
constexpr bool is_trivially_destructible_extended_v
constexpr bool is_trivially_copy_constructible_extended_v

Used when T is stored directly in the inline buffer of the Any.

Definition at line 43 of file BLI_any.hh.

◆ info_for_unique_ptr

template<typename ExtraInfo, typename T>
AnyTypeInfo<ExtraInfo> blender::blenlib_detail::info_for_unique_ptr
inline
Initial value:
= {
[](void *dst, const void *src) {
new (dst) Ptr<T>(new T(**static_cast<const Ptr<T> *>(src)));
},
[](void *dst, void *src) { new (dst) Ptr<T>(new T(std::move(**static_cast<Ptr<T> *>(src)))); },
[](void *src) { std::destroy_at(static_cast<Ptr<T> *>(src)); },
[](const void *src) -> const void * { return &**static_cast<const Ptr<T> *>(src); },
ExtraInfo::template get<T>()}
std::unique_ptr< T > Ptr
Definition BLI_any.hh:60

Definition at line 62 of file BLI_any.hh.