kblib 0.2.3
General utilities library for modern C++
|
Provides by-value algorithms which produce containers. More...
#include "tdecl.h"
#include "algorithm.h"
#include "fakestd.h"
#include "iterators.h"
#include "traits.h"
#include <algorithm>
#include <iterator>
#include <numeric>
#include <tuple>
Go to the source code of this file.
Classes | |
struct | kblib::detail::buildiota_impl< Container, true > |
struct | kblib::detail::buildiota_impl< Array, false > |
Namespaces | |
namespace | kblib |
The main namespace in which all entities from kblib are defined. | |
namespace | kblib::detail |
The namespace used for implementation details within kblib. | |
Functions | |
template<typename Container , typename InputIt , typename UnaryFunction > | |
auto | kblib::build (InputIt first, InputIt last, UnaryFunction f, typename Container::allocator_type allocator=typename Container::allocator_type{}) -> Container |
Constructs a container by applying a UnaryFunction to every element of an input range. More... | |
template<typename Container , typename InputIt , typename InputIt2 , typename BinaryFunction > | |
auto | kblib::build (InputIt first, InputIt last, InputIt2 first2, BinaryFunction f, typename Container::allocator_type allocator=typename Container::allocator_type{}) -> Container |
Constructs a container by applying a BinaryFunction to every pair of elements in the input ranges. More... | |
template<typename Array , typename InputIt , typename UnaryFunction , enable_if_t< not is_resizable_v< Array >, int > = 0> | |
auto | kblib::build (InputIt first, InputIt last, UnaryFunction f) -> Array |
Constructs an array-like container by applying a UnaryFunction to every element of an input range. More... | |
template<typename Array , typename InputIt , typename InputIt2 , typename BinaryFunction , enable_if_t< not is_resizable_v< Array >, int > = 0> | |
auto | kblib::build (InputIt first, InputIt last, InputIt2 first2, BinaryFunction f) -> Array |
Constructs an array-like container by applying a BinaryFunction to every pair of elements in the input ranges. More... | |
template<typename Container , typename Functor > | |
auto | kblib::build (Functor f, size_t size, typename Container::allocator_type allocator=typename Container::allocator_type{}) -> Container |
Constructs a container with elements initialized by repeatedly calling a generating function. More... | |
template<typename Array , typename Functor , enable_if_t< not is_resizable_v< Array >, int > = 0> | |
auto | kblib::build (Functor f, size_t size=std::tuple_size< Array >::value) -> Array |
Constructs an array-like container with elements initialized by repeatedly calling a generating function. More... | |
template<typename Container , typename InputIt , typename UnaryFunction > | |
auto | kblib::build_dy (InputIt first, InputIt last, UnaryFunction f) -> Container |
Constructs a container by applying a UnaryFunction to every element of an input range. Exactly like build , but for resizable non-AllocatorAware Containers (which are hard to detect automatically). More... | |
template<typename Container , typename InputIt , typename InputIt2 , typename BinaryFunction > | |
auto | kblib::build_dy (InputIt first, InputIt last, InputIt2 first2, BinaryFunction f) -> Container |
Constructs a container by applying a BinaryFunction to every pair of elements in the input ranges. Exactly like build , but for resizable non-AllocatorAware Containers (which are hard to detect automatically). More... | |
template<typename Container , typename Functor > | |
auto | kblib::build_dy (Functor f, size_t size) -> Container |
Constructs a container with elements initialized by repeatedly calling a generating function. Exactly like build , but for resizable non-AllocatorAware Containers (which are hard to detect automatically). More... | |
template<typename Container , typename Range , typename UnaryFunction , enable_if_t< is_resizable_v< Container >, int > = 0> | |
auto | kblib::build_dy (Range &&r, UnaryFunction f) -> Container |
template<typename Container , typename... Args> | |
constexpr auto | kblib::buildiota (Args &&... args) -> auto |
Builds a container of increasing values. More... | |
template<typename Container , typename InputIt > | |
auto | kblib::build_copy (InputIt first, InputIt last, typename Container::allocator_type allocator=typename Container::allocator_type{}) -> Container |
template<typename Container , typename Range , enable_if_t< is_resizable_v< Container >, int > = 0> | |
auto | kblib::build_copy (Range &&r) -> Container |
template<typename Container , typename Range > | |
auto | kblib::build_copy (Range &&r, typename Container::allocator_type allocator=typename Container::allocator_type{}) -> Container |
template<typename Container , typename InputIt , enable_if_t< not is_resizable_v< Container >, int > = 0> | |
constexpr auto | kblib::build_copy (InputIt first, InputIt last) -> Container |
template<typename Container , typename Range , enable_if_t< not is_resizable_v< Container >, int > = 0> | |
constexpr auto | kblib::build_copy (Range &&r) -> Container |
template<typename Container , typename InputIt , enable_if_t< not is_resizable_v< Container >, int > = 0> | |
auto | kblib::build_copy (InputIt first, InputIt last, std::size_t size) -> Container |
template<typename Container , typename Range , enable_if_t< not is_resizable_v< Container >, int > = 0> | |
auto | kblib::build_copy (Range &&r, std::size_t size) -> Container |
template<typename Container , typename InputIt , typename Predicate > | |
auto | kblib::build_copy_if (InputIt first, InputIt last, Predicate f, typename Container::allocator_type allocator=typename Container::allocator_type{}) -> Container |
template<typename Container , typename InputIt , typename Size > | |
auto | kblib::build_copy_n (InputIt first, Size count, typename Container::allocator_type allocator=typename Container::allocator_type{}) -> Container |
template<typename Container , typename InputIt , typename Size , typename Predicate > | |
auto | kblib::build_copy_n_if (InputIt first, Size count, Predicate f, typename Container::allocator_type allocator=typename Container::allocator_type{}) -> Container |
Provides by-value algorithms which produce containers.
Definition in file build.h.