Namespaces
Variants
Actions

std::is_sufficiently_aligned

From cppreference.com
< cpp‎ | memory
 
 
Memory management library
(exposition only*)
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
(until C++20*)
(until C++20*)

Garbage collector support (until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
 
Defined in header <memory>
template< std::size_t N, class T >
bool is_sufficiently_aligned( T* ptr );
(since C++26)

Checks whether the pointer ptr points to an object whose alignment has a value of at least N.

The behavior is undefined if ptr does not point to an object of type T (ignoring cv-qualification at every level).

Contents