Introduced BOOST_INTRUSIVE_FORCEINLINE, disabled by default until it's more tested

This commit is contained in:
Ion Gaztañaga
2015-12-24 10:29:09 +01:00
parent 381a062e23
commit 6a9fa390ae
34 changed files with 405 additions and 337 deletions
@@ -67,19 +67,19 @@ struct pointer_plus_bits<T*, NumBits>
static const uintptr_t Mask = uintptr_t((uintptr_t(1u) << NumBits) - 1);
typedef T* pointer;
static pointer get_pointer(pointer n)
BOOST_INTRUSIVE_FORCEINLINE static pointer get_pointer(pointer n)
{ return pointer(uintptr_t(n) & uintptr_t(~Mask)); }
static void set_pointer(pointer &n, pointer p)
BOOST_INTRUSIVE_FORCEINLINE static void set_pointer(pointer &n, pointer p)
{
BOOST_INTRUSIVE_INVARIANT_ASSERT(0 == (uintptr_t(p) & Mask));
n = pointer(uintptr_t(p) | (uintptr_t(n) & Mask));
}
static std::size_t get_bits(pointer n)
BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_bits(pointer n)
{ return std::size_t(uintptr_t(n) & Mask); }
static void set_bits(pointer &n, std::size_t c)
BOOST_INTRUSIVE_FORCEINLINE static void set_bits(pointer &n, std::size_t c)
{
BOOST_INTRUSIVE_INVARIANT_ASSERT(uintptr_t(c) <= Mask);
n = pointer(uintptr_t((get_pointer)(n)) | uintptr_t(c));