|
xapian-core
2.0.0
|
Cast a pointer we know is suitably aligned. More...
#include <type_traits>
Include dependency graph for alignment_cast.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| template<typename T , typename U > | |
| std::enable_if_t< std::is_const_v< typename std::remove_pointer_t< U > >, T > | alignment_cast (U ptr) |
| Cast a pointer we know is suitably aligned. More... | |
| template<typename T , typename U > | |
| std::enable_if_t<!std::is_const_v< typename std::remove_pointer_t< U > >, T > | alignment_cast (U ptr) |
| Cast a pointer we know is suitably aligned. More... | |
Cast a pointer we know is suitably aligned.
Definition in file alignment_cast.h.
| std::enable_if_t<std::is_const_v<typename std::remove_pointer_t<U> >, T> alignment_cast | ( | U | ptr | ) |
Cast a pointer we know is suitably aligned.
Has the same effect as reinterpret_cast<T> but avoids warnings about alignment issues.
Version for const pointers.
Definition at line 39 of file alignment_cast.h.
| std::enable_if_t<!std::is_const_v<typename std::remove_pointer_t<U> >, T> alignment_cast | ( | U | ptr | ) |
Cast a pointer we know is suitably aligned.
Has the same effect as reinterpret_cast<T> but avoids warnings about alignment issues.
Version for non-const pointers.
Definition at line 53 of file alignment_cast.h.