|
xapian-core
1.4.30
|
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< std::is_const< typename std::remove_pointer< U >::type >::value, T >::type | alignment_cast (U ptr) |
| Cast a pointer we know is suitably aligned. More... | |
| template<typename T , typename U > | |
| std::enable_if<!std::is_const< typename std::remove_pointer< U >::type >::value, T >::type | 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<std::is_const<typename std::remove_pointer<U>::type>::value, T>::type 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<!std::is_const<typename std::remove_pointer<U>::type>::value, T>::type 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.