3#ifndef TETL_MEMORY_ASSUME_ALIGNED_HPP
4#define TETL_MEMORY_ASSUME_ALIGNED_HPP
27template <etl::
size_t N,
typename T>
31 static_assert(
alignof(T) <= N);
34#if __has_builtin(__builtin_assume_aligned)
35 return static_cast<T*
>(__builtin_assume_aligned(ptr, N));
constexpr auto has_single_bit(UInt x) noexcept -> bool
Checks if x is an integral power of two.
Definition has_single_bit.hpp:21
constexpr auto assume_aligned(T *ptr) -> T *
Informs the implementation that the object ptr points to is aligned to at least N....
Definition assume_aligned.hpp:28
Definition adjacent_find.hpp:8
constexpr auto is_constant_evaluated() noexcept -> bool
Detects whether the function call occurs within a constant-evaluated context. Returns true if the eva...
Definition is_constant_evaluated.hpp:16