dot-xx
A personal collection of small C++ modules
Loading...
Searching...
No Matches
dxx.utils Module Reference

Miscellaneous stuff that is useful but too small/unimportant to be put in its own module. More...

Concepts

concept  dxx::utils::pointer
 Concept over std::is_pointer_v
concept  dxx::utils::reference
 Concept over std::is_reference_v
concept  dxx::utils::const_vrp
 A const value, a pointer to const, or a reference to const.
concept  dxx::utils::mut_vrp
 Inverse of const_vrp.
concept  dxx::utils::is_a
 Checks if the type is an instance of a template.

Classes

class  dxx::utils::Defer< TDeferred >
 Class for deferring operations until the end of lifetime. More...

Functions

template<typename Integer>
constexpr auto dxx::utils::range (const Integer &to)
 Python-like range function ([ 0, to ))
template<typename From, std::convertible_to< From > To>
constexpr auto dxx::utils::range (const From &from, const To &to)
 Python-like range function ([ from, to ))
template<typename From, std::convertible_to< From > To, std::convertible_to< From > Step>
constexpr auto dxx::utils::range (const From &from, const To &to, const Step &step)
 Python-like range function ([ from, to ) with step step)

Variables

template<template< typename... > typename Range>
constexpr As< Range > dxx::utils::as {}
 An adaptor-like shortcut to invoking an std::from_range constructor for a class template

Detailed Description

Miscellaneous stuff that is useful but too small/unimportant to be put in its own module.

Files

file  /build-llvm-libcpp/_deps/dot-xx-utils-src/src/utils.xx
 The main interface file of the dxx::utils module.
file  /build-llvm-libcpp/_deps/dot-xx-utils-src/src/defer.xx
 A simple RAII wrapper to run stuff at the end of scope.
file  /build-llvm-libcpp/_deps/dot-xx-utils-src/src/ranges.xx
 Utility code that helps working with ranges.
file  /build-llvm-libcpp/_deps/dot-xx-utils-src/src/traits.xx
 Type traits and concepts.