nngn
Loading...
Searching...
No Matches
ranges.h File Reference
#include <algorithm>
#include <cassert>
#include <cstring>
#include <iterator>
#include <numeric>
#include <ranges>
#include <span>
#include <utility>
#include "utils.h"
Include dependency graph for ranges.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nngn::owning_view< T >
 
struct  nngn::range_to< T >
 

Namespaces

namespace  nngn
 
namespace  std
 
namespace  std::ranges
 

Functions

constexpr auto * nngn::data_end (std::ranges::contiguous_range auto &&r)
 
template<typename T >
void nngn::resize_and_init (T *p, std::size_t n, auto &&f)
 
template<typename V >
void nngn::set_capacity (V *v, size_t n)
 
template<std::size_t N>
consteval auto nngn::to_array (const char *s)
 
template<std::size_t N>
consteval auto nngn::to_array (const char(&s)[N])
 
template<std::size_t N>
consteval auto nngn::to_array (const std::ranges::contiguous_range auto &r)
 
template<std::size_t N, std::ranges::view V>
consteval auto nngn::to_array (V &&v)
 
constexpr bool nngn::contains (const std::ranges::contiguous_range auto &r, const auto &x)
 
constexpr bool nngn::in_range (const std::ranges::contiguous_range auto &r, const auto &x)
 
template<std::ranges::forward_range R, typename Proj = std::identity>
constexpr bool nngn::is_sequence (R &&r, Proj proj={})
 
template<std::ranges::range R>
constexpr void nngn::iota (R &&r, std::ranges::range_value_t< R > &&x={})
 
constexpr auto nngn::reduce (std::ranges::range auto &&r)
 
constexpr auto nngn::reduce (std::ranges::range auto &&r, auto &&init={}, auto &&op=std::plus<>{})
 
void nngn::const_time_erase (auto *v, auto *p)
 
template<std::input_iterator I, std::output_iterator< std::iter_value_t< I > > O>
constexpr void nngn::fill_with_pattern (I f, I l, O df, O dl)
 
constexpr void nngn::fill_with_pattern (std::ranges::range auto &&p, std::ranges::range auto &&r)
 
template<typename T >
constexpr Tnngn::memcpy (T *dst, std::ranges::contiguous_range auto &&r)
 
template<typename T >
constexpr Tnngn::memmove (T *dst, std::ranges::contiguous_range auto &&r)
 

Variables

template<typename T >
using nngn::const_iterator