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

Utility code that helps working with ranges. More...

import std;

Classes

struct  dxx::utils::As< Range >

Namespaces

namespace  dxx::utils
 The main namespace of the dxx::utils module.

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

Utility code that helps working with ranges.