file
core.hHelper header for including most of the core useful bits in the library.
Includes the following headers:
- apply_
alignment.h - assume_
aligned.h - bit.h
- bit_
cast.h - build.h
- for_
sequence.h - integer_
literals.h - integer_
aliases.h - is_
constant_ evaluated.h - launder.h
- meta.h
- pointer_
cast.h - scope_
guard.h - size_
t_ literals.h - strong_
typedef.h - type_
list.h
Namespaces
- namespace muu
- The root namespace for all muu functions and types.
Functions
-
template <typename T, typename Offset>auto apply_offset(T* ptr, Offset offset) -> T* constexpr noexcept
- Applies a byte offset to a pointer.
-
template <typename T, typename U>auto between(const T& val, const U& low, const U& high) -> bool constexpr noexcept
- Returns true if a value is between two bounds (inclusive).
-
template <typename T>auto clamp(const T& val, const T& low, const T& high) -> const T& constexpr noexcept
- Returns a value clamped between two bounds (inclusive).
-
template <typename T, typename... U>auto max(const T& val1, const T& val2, const U&... vals) -> const T& constexpr noexcept
- Returns the maximum of two or more values.
-
template <typename T, typename... U>auto min(const T& val1, const T& val2, const U&... vals) -> const T& constexpr noexcept
- Returns the minimum of two or more values.
-
template <typename T>auto to_address(T* p) -> T* constexpr noexcept
- Obtain the address represented by p without forming a reference to the pointee.
-
template <typename Ptr>auto to_address(const Ptr& p) -> auto constexpr noexcept
- Obtain the address represented by p without forming a reference to the pointee.
-
template <typename T>auto unwrap(T val) -> std::
underlying_type_t<T> constexpr noexcept - Unwraps an enum to it's raw integer equivalent.