Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZStd::no_default_allocator Class Reference

#include <allocator.h>

Public Types

using pointer = void *
 
using size_type = AZStd::size_t
 
using difference_type = AZStd::ptrdiff_t
 

Public Member Functions

AZ_FORCE_INLINE no_default_allocator (const char *name="Invalid allocator")
 
AZ_FORCE_INLINE no_default_allocator (const allocator &)
 
AZ_FORCE_INLINE no_default_allocator (const allocator &, const char *)
 
AZ_FORCE_INLINE allocatoroperator= (const allocator &rhs)
 
AZ_FORCE_INLINE pointer allocate (size_type byteSize, size_type alignment)
 
AZ_FORCE_INLINE void deallocate (pointer ptr, size_type byteSize, size_type alignment)
 
AZ_FORCE_INLINE size_type resize (pointer ptr, size_type newSize)
 
AZ_FORCE_INLINE const char * get_name () const
 
AZ_FORCE_INLINE void set_name (const char *name)
 
AZ_FORCE_INLINE size_type max_size () const
 
AZ_FORCE_INLINE bool is_lock_free ()
 
AZ_FORCE_INLINE bool is_stale_read_allowed ()
 
AZ_FORCE_INLINE bool is_delayed_recycling ()
 

Detailed Description

No Default allocator implementation (invalid allocator).

  • If you want to make sure we don't use default allocator, define AZStd::allocator to AZStd::no_default_allocator (this allocator) the code which try to use it, will not compile.
  • If you have a compile error here, this means that you did not provide allocator to your container. This is intentional so you make sure where do you allocate from. If this is not the AZStd integration this means that you might have defined in your code a default allocator or even have predefined container types. Use them.

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