10#ifndef MCRL2_UTILITIES_TAGGED_POINTER_H_
11#define MCRL2_UTILITIES_TAGGED_POINTER_H_
27 return reinterpret_cast<T*
>(
reinterpret_cast<std::size_t
>(p) | 1);
33 return reinterpret_cast<T*
>(
reinterpret_cast<std::size_t
>(p.load(std::memory_order_relaxed)) | 1);
40 return reinterpret_cast<T*
>(
reinterpret_cast<std::size_t
>(p) & ~
static_cast<std::size_t
>(1));
46 return reinterpret_cast<T*
>(
reinterpret_cast<std::size_t
>(p.load(std::memory_order_relaxed)) & ~
static_cast<std::size_t
>(1));
53 return reinterpret_cast<std::size_t
>(p) & 1;
59 return reinterpret_cast<std::size_t
>(p.load(std::memory_order_relaxed)) & 1;
93 return get() !=
nullptr;
103 return get() ==
nullptr;
108 return !(*
this ==
nullptr);
113 return get() == other.
get();
118 return !(*
this == other);
123 return get() < other.get();
128 return get() <= other.get();
133 return get() > other.get();
138 return get() >= other.get();
180 mutable std::conditional_t<detail::GlobalThreadSafe, detail::atomic_wrapper<T*>, T*>
m_pointer =
nullptr;
194 const std::hash<const T*> hasher;
195 return hasher(p.
get());
A pointer storage object that uses a least significant bit as a mark. Can be used by objects that are...
const T * operator->() const
bool operator==(const tagged_pointer &other) const
bool operator>(const tagged_pointer &other) const noexcept
bool operator>=(const tagged_pointer &other) const noexcept
bool operator==(std::nullptr_t) const
void swap(tagged_pointer< T > &other)
void untag() const
Remove the tag.
bool operator<(const tagged_pointer &other) const noexcept
void operator=(std::nullptr_t)
const T & operator*() const
void tag() const
Apply a tag to the pointer that can be checked with tagged().
bool operator!=(std::nullptr_t) const
bool operator<=(const tagged_pointer &other) const noexcept
bool operator!=(const tagged_pointer &other) const
std::conditional_t< detail::GlobalThreadSafe, detail::atomic_wrapper< T * >, T * > m_pointer
T * tag(const T *p)
Applies a tag to a pointer.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
std::size_t operator()(const mcrl2::utilities::tagged_pointer< T > &p) const