|
|
template<typename T > |
| using | rstd::mtp::void_empty_t = cond<is_void<T>, empty, T> |
| | Maps void to empty, otherwise yields T.
|
| |
|
template<typename T , typename U > |
| using | rstd::mtp::follow_const_t |
| | Propagates the const-ness of T onto U.
|
| |
|
using | rstd::i8 = ::int8_t |
| | 8-bit signed integer.
|
| |
|
using | rstd::i16 = ::int16_t |
| | 16-bit signed integer.
|
| |
|
using | rstd::i32 = ::int32_t |
| | 32-bit signed integer.
|
| |
|
using | rstd::i64 = ::int64_t |
| | 64-bit signed integer.
|
| |
|
using | rstd::u8 = ::uint8_t |
| | 8-bit unsigned integer.
|
| |
|
using | rstd::u16 = ::uint16_t |
| | 16-bit unsigned integer.
|
| |
|
using | rstd::u32 = ::uint32_t |
| | 32-bit unsigned integer.
|
| |
|
using | rstd::u64 = ::uint64_t |
| | 64-bit unsigned integer.
|
| |
|
using | rstd::u128 = unsigned __int128 |
| | 128-bit unsigned integer.
|
| |
|
using | rstd::i128 = __int128 |
| | 128-bit signed integer.
|
| |
|
using | rstd::idx = ::ptrdiff_t |
| | Signed index type, equivalent to Rust's isize used for offsets.
|
| |
|
using | rstd::usize = ::size_t |
| | Pointer-sized unsigned integer, equivalent to Rust's usize.
|
| |
|
using | rstd::isize = ::intptr_t |
| | Pointer-sized signed integer, equivalent to Rust's isize.
|
| |
|
using | rstd::voidp = void* |
| | Mutable void pointer.
|
| |
|
using | rstd::const_voidp = void const* |
| | Const void pointer.
|
| |
|
using | rstd::usizeptr = ::uintptr_t |
| | Integer type guaranteed to hold a pointer value.
|
| |
|
using | rstd::panic_::WriteFn = bool (*)(void*, u8 const*, usize) |
| | Function pointer type for writing panic message bytes.
|
| |
|
| template<typename T > |
| constexpr auto | rstd::addressof (T &val) noexcept -> T * |
| | Obtains the actual address of an object, even if operator& is overloaded.
|
| |
| template<typename T , typename U = T> |
| constexpr T | rstd::exchange (T &obj, U &&new_val) noexcept(mtp::noex_move< T > &&mtp::noex_assign< T &, U >) |
| | Replaces obj with new_val, returning the old value.
|
| |
template<typename T , typename... Args>
requires (! mtp::is_array_dst<T>) && requires { new T{mtp::declval<Args>()...}; } |
| constexpr T * | rstd::construct_at (T *location, Args &&... args) noexcept(noexcept(new T{mtp::declval< Args >()...})) |
| | Constructs an object of type T at the given memory location.
|
| |
| template<typename T > |
| constexpr void | rstd::destroy_at (T *location) |
| | Destroys the object at the given location by calling its destructor.
|
| |
| template<typename T > |
| constexpr T * | rstd::launder (T *__p) noexcept |
| | Obtains a pointer to an object created in storage occupied by another object of the same type.
|
| |
| constexpr auto | rstd::strlen (char const *s) noexcept -> usize |
| | Returns the length of a null-terminated byte string.
|
| |
template<typename To , typename From >
requires (sizeof(To) == sizeof(From)) && mtp::triv_copy<To> && mtp::triv_copy<From> |
| constexpr To | rstd::bit_cast (const From &from) noexcept |
| | Reinterprets the bits of from as a value of type To.
|
| |
|
void | rstd::unreachable () |
| | Informs the compiler that this point in the code is unreachable.
|
| |
|
template<typename T > |
| void | rstd::swap (T &a, T &b) noexcept(mtp::noex_copy< T >) |
| | Swaps the values of a and b.
|
| |
|
template<typename T > |
| constexpr auto | rstd::min (T a, T b) noexcept -> T |
| | Returns the smaller of two values.
|
| |
| template<typename InputIter1 , typename InputIter2 > |
| constexpr auto | rstd::lexicographical_compare_three_way (InputIter1 first1, InputIter1 last1, InputIter2 first2, InputIter2 last2) |
| | Performs lexicographic three-way comparison of two ranges using <=>.
|
| |
|
template<typename T > |
| auto | rstd::mtp::declval () noexcept -> add_ref_rv< T > |
| | Utility to simplify expressions used in unevaluated operands.
|
| |
|
constexpr bool | rstd::mtp::is_constant_evaluated () noexcept |
| | Detects whether the current invocation occurs within a constant-evaluated context.
|
| |
|
template<usize I, auto... Vals> |
| consteval auto | rstd::mtp::get_auto () |
| | Retrieves the I-th value from a non-type template parameter pack at compile time.
|
| |
|
template<usize I, typename... Ts> |
| constexpr auto & | rstd::get (tuple< Ts... > &t) noexcept |
| | Free function version of get<I>(t), for structured-binding compatibility.
|
| |
|
template<typename... Ts> |
| constexpr auto | rstd::make_tuple (Ts &&... ts) |
| | Creates a tuple, deducing element types from the arguments.
|
| |
|
template<typename F , typename... Ts> |
| constexpr decltype(auto) | rstd::apply (F &&f, tuple< Ts... > &t) |
| | Invokes f with the elements of t as individual arguments.
|
| |
|
constexpr auto | file_name () const noexcept -> const char * |
| | Returns the file name where this location was captured.
|
| |
|
constexpr auto | line () const noexcept -> u32 |
| | Returns the line number.
|
| |
|
constexpr auto | column () const noexcept -> u32 |
| | Returns the column number.
|
| |
|
static constexpr auto | from (sl_type sl) noexcept -> Location |
| | Creates a Location from a source_location.
|
| |
|
consteval | SrcLoc (sl_type v=sl_type::current()) noexcept |
| | Implicitly captures the caller's source location at compile time.
|
| |
|
Applies array-to-pointer, function-to-pointer, and cv-removal transformations.
|
|
template<typename T > |
| using | rstd::mtp::add_ptr |
| | Adds a pointer indirection to T.
|
| |
|
template<typename T > |
| using | rstd::mtp::add_ref = ::add_ref<T>::type |
| | Adds an lvalue reference to T.
|
| |
|
template<typename T > |
| using | rstd::mtp::add_ref_rv = ::add_ref_rv<T>::type |
| | Adds an rvalue reference to T.
|
| |
|
template<typename T > |
| using | rstd::mtp::add_const = ::add_const<T>::type |
| | Adds const qualification to T.
|
| |
|
template<typename T > |
| using | rstd::mtp::rm_const = ::rm_const<T>::type |
| | Removes const qualification from T.
|
| |
|
template<typename T > |
| using | rstd::mtp::rm_cv = __remove_cv(T) |
| | Removes top-level const and volatile qualifiers from T.
|
| |
|
template<typename T > |
| using | rstd::mtp::rm_ptr = __remove_pointer(T) |
| | Removes one level of pointer indirection from T.
|
| |
|
template<typename T > |
| using | rstd::mtp::rm_ref = ::rm_ref<T>::type |
| | Removes reference qualification from T.
|
| |
|
template<typename T > |
| using | rstd::mtp::rm_cvf = __remove_cvref(T) |
| | Removes reference and cv qualifiers from T.
|
| |