xapian-core
1.4.27
|
Cast a pointer we know is suitably aligned. More...
#include <type_traits>
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.
Referenced by Xapian::SnowballStemImplementation::CAPACITY(), Xapian::Internal::closefrom(), do_aligned_read(), do_aligned_write(), Glass::Cursor::get_n(), Glass::Cursor::refs(), Xapian::SnowballStemImplementation::SET_CAPACITY(), Glass::Cursor::set_n(), Xapian::SnowballStemImplementation::SET_SIZE(), and Xapian::SnowballStemImplementation::SIZE().
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.