A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/algorithm/../../cpp/../cpp/memory/is_sufficiently_aligned.html below:

std::is_sufficiently_aligned - cppreference.com

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).

[edit] Return value

true if ptr points to an object that has alignment at least N; otherwise false.

[edit] Exceptions

Throws nothing.

[edit] Notes

std::is_sufficiently_aligned can be used as a precondition to std::assume_aligned.

[edit] Possible implementation [edit] Example [edit] See also alignof (C++11) queries alignment requirements of a type
(operator)[edit] alignas (C++11) specifies that the storage for the variable should be aligned by specific amount
(specifier)[edit]

(since C++11)(deprecated in C++23)

defines the type suitable for use as uninitialized storage for types of given size
(class template) [edit] aligns a pointer in a buffer
(function) [edit] a type for aligned access to elements of mdspan
(class template) [edit]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4