C++ Library Extensions 2022.12.09
To help learn modern C++ programming
cpg_std_extensions.hpp File Reference
#include "cpg_types.hpp"
#include "cpg_conversion.hpp"
Include dependency graph for cpg_std_extensions.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  stl_extensions
 
namespace  stl_extensions::hidden
 

Concepts

concept  stl_extensions::append_operator_c
 
concept  stl_extensions::prepend_operator_c
 

Macros

#define NOMINMAX
 

Typedefs

template<typename TupleA , typename... TupleTypes>
using stl_extensions::hidden::tuple_cross_product_t = decltype((TupleA{} > > ... > > TupleTypes{}))
 
template<typename TupleA , typename... TupleTypes>
using stl_extensions::tuple_cross_product_t = hidden::tuple_cross_product_t< std::remove_cvref_t< TupleA >, std::remove_cvref_t< TupleTypes >... >
 
template<typename TupleA , typename... TupleTypes>
using stl_extensions::tuple_cartesian_product_t = tuple_cross_product_t< TupleA, TupleTypes... >
 
template<typename TupleA , typename TupleB >
using stl_extensions::hidden::common_signed_tuple_pair = decltype(fn_common_signed_tuple(TupleA{}, TupleB{}))
 
template<cgt::tuple_flat_c TupleA, cgt::tuple_flat_c TupleB>
using stl_extensions::hidden::common_unsigned_tuple_pair = decltype(fn_common_unsigned_tuple(TupleA{}, TupleB{}))
 
template<cgt::tuple_flat_c TupleType, cgt::tuple_flat_c... TupleTypes>
using stl_extensions::hidden::common_signed_tuple_t = decltype(hidden::fn_common_signed_tuples(TupleType{}, TupleTypes{}...))
 
template<cgt::tuple_flat_c TupleType, cgt::tuple_flat_c... TupleTypes>
using stl_extensions::hidden::common_unsigned_tuple_t = decltype(hidden::fn_common_unsigned_tuples(TupleType{}, TupleTypes{}...))
 
template<cgt::tuple_flat_c TupleType, cgt::tuple_flat_c... TupleTypes>
using stl_extensions::common_signed_tuple_t = hidden::common_signed_tuple_t< std::remove_cvref_t< TupleType >, std::remove_cvref_t< TupleTypes >... >
 
template<cgt::tuple_flat_c TupleType, cgt::tuple_flat_c... TupleTypes>
using stl_extensions::common_unsigned_tuple_t = hidden::common_unsigned_tuple_t< TupleType, TupleTypes... >
 

Functions

template<template< typename, typename, typename... > class ContainerType, typename EleType , typename Type , typename ... Types, std::common_with< EleType > S>
requires requires { container.emplace_back(EleType{}); } || requires { container.emplace(container.end(), EleType{}); } || requires { container.emplace(EleType{}); }
ContainerType< EleType, Type, Types... > & stl_extensions::operator<< (ContainerType< EleType, Type, Types... > &container, S &&s)
 Implace back. More...
 
template<template< typename, typename, typename... > class ContainerType, typename EleType , typename Type , typename ... Types, std::common_with< EleType > S>
requires requires { container.emplace_front(EleType{}); } || requires { container.emplace(container.begin(), EleType{}); } || requires { container.emplace(EleType{}); }
ContainerType< EleType, Type, Types... > & stl_extensions::operator>> (ContainerType< EleType, Type, Types... > &container, S &&s)
 Implace front. More...
 
template<template< typename, typename, typename... > class ContainerType, typename EleType , typename Type , typename ... Types, cgt::view_flat_c ViewType>
requires requires { container.emplace_back(EleType{}); } || requires { container.insert(container.end(), EleType{}); } || requires { container.emplace(EleType{}); }
ContainerType< EleType, Type, Types... > & stl_extensions::operator<< (ContainerType< EleType, Type, Types... > &container, ViewType &&view)
 Implace Back. More...
 
template<template< typename, typename, typename... > class ContainerType, typename EleType , typename Type , typename ... Types, cgt::view_flat_c ViewType>
requires requires { container.emplace_front(EleType{}); } || requires { container.insert(container.begin(), EleType{}); } || requires { container.emplace(EleType{}); }
ContainerType< EleType, Type, Types... > & stl_extensions::operator>> (ContainerType< EleType, Type, Types... > &container, ViewType &&view)
 Implace Front. More...
 
template<typename CharType >
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, cpg::hidden::flush)
 
template<typename CharType >
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, cpg::hidden::endl)
 
template<typename CharType >
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, cpg::hidden::endL)
 
template<typename CharType >
std::basic_ostringstream< CharType > & stl_extensions::operator<< (std::basic_ostringstream< CharType > &os, cpg::hidden::clear)
 
template<typename CharType >
std::basic_ostringstream< CharType > & stl_extensions::operator<< (std::basic_ostringstream< CharType > &os, cpg::hidden::flush)
 
template<typename CharType >
std::basic_ostringstream< CharType > & stl_extensions::operator<< (std::basic_ostringstream< CharType > &os, cpg::hidden::endl)
 
template<typename CharType >
std::basic_ostringstream< CharType > & stl_extensions::operator<< (std::basic_ostringstream< CharType > &os, cpg::hidden::endL)
 
template<typename = void>
std::ostream & stl_extensions::operator<< (std::ostream &os, const wchar_t *str)
 
template<typename = void>
std::ostream & stl_extensions::operator<< (std::ostream &os, std::wstring const &str)
 
template<typename = void>
std::ostream & stl_extensions::operator<< (std::ostream &os, const char8_t *str)
 
template<typename = void>
std::ostream & stl_extensions::operator<< (std::ostream &os, std::u8string const &str)
 
template<typename = void>
std::wostream & stl_extensions::operator<< (std::wostream &os, const char *str)
 
template<typename = void>
std::wostream & stl_extensions::operator<< (std::wostream &os, const char8_t *str)
 
template<typename = void>
std::wostream & stl_extensions::operator<< (std::wostream &os, std::u8string const &str)
 
template<typename CharType >
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, std::basic_stringstream< CharType > const &stream)
 
template<typename... Ts, typename... Ss>
constexpr auto stl_extensions::hidden::tuple_connect_tail (std::tuple< Ts... >, std::tuple< Ss... >)
 
template<typename T , typename... Ss>
constexpr auto stl_extensions::hidden::tuple_pairs (T, std::tuple< Ss... >)
 
template<typename... Ts, typename... Ss>
constexpr auto stl_extensions::hidden::tuple_pairs (std::tuple< Ts... >, std::tuple< Ss... >)
 
template<typename... TT, typename T , typename... Ts, typename... Ss>
constexpr auto stl_extensions::hidden::fn_tuple_cross_product (std::tuple< TT... > tt, std::tuple< T, Ts... > t, std::tuple< Ss... > s)
 
template<cgt::tuple_flat_c T, cgt::tuple_flat_c S, cgt::tuple_flat_c ... Tails>
constexpr auto stl_extensions::tuple_cartesian_product_type (T A, S B, Tails... tails)
 
template<typename L , typename R >
constexpr auto stl_extensions::hidden::fn_common_signed_tuple (L const &, R const &)
 
template<typename... Ls, typename... Rs>
constexpr auto stl_extensions::hidden::fn_common_signed_tuple (std::tuple< Ls... > L, std::tuple< Rs... > R)
 
template<typename L , typename R >
constexpr auto stl_extensions::hidden::fn_common_unsigned_tuple (L const &, R const &)
 
template<typename... Ls, typename... Rs>
constexpr auto stl_extensions::hidden::fn_common_unsigned_tuple (std::tuple< Ls... > L, std::tuple< Rs... > R)
 
template<cgt::tuple_flat_c TupleType>
constexpr auto stl_extensions::hidden::fn_common_signed_tuples (TupleType Tuple)
 
template<cgt::tuple_flat_c TupleA, cgt::tuple_flat_c TupleB, cgt::tuple_flat_c... TupleTypes>
constexpr auto stl_extensions::hidden::fn_common_signed_tuples (TupleA A, TupleB B, TupleTypes... Tuples)
 
template<cgt::tuple_flat_c TupleType>
constexpr auto stl_extensions::hidden::fn_common_unsigned_tuples (TupleType Tuple)
 
template<cgt::tuple_flat_c TupleA, cgt::tuple_flat_c TupleB, cgt::tuple_flat_c... TupleTypes>
constexpr auto stl_extensions::hidden::fn_common_unsigned_tuples (TupleA A, TupleB B, TupleTypes... Tuples)
 
template<typename CharType , typename Type >
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, const std::optional< Type > &opt)
 
template<typename CharType , typename FirstType , typename SecondType >
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, const std::pair< FirstType, SecondType > &pr)
 
template<typename CharType , typename... Types>
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, const std::tuple< Types... > &container)
 
template<typename CharType , typename Type , typename... Types>
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, const std::variant< Type, Types... > &v)
 
template<typename CharType , typename ContainerType >
requires (cgt::std_array_flat_c< ContainerType > || cgt::span_flat_c< ContainerType > || ( cgt::c_array_flat_c<ContainerType> && cgt::non_chars_c<ContainerType> ) )
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, ContainerType &&container)
 
template<class F , typename T , std::size_t N>
constexpr decltype(auto) stl_extensions::apply (F &&f, T(&&c_array)[N])
 
template<class F , typename T , std::size_t N>
constexpr decltype(auto) stl_extensions::apply (F &&f, T(&c_array)[N])
 
template<std::size_t I, class T , std::size_t N>
constexpr decltype(auto) stl_extensions::get (T(&c_array)[N]) noexcept
 
template<std::size_t I, class T , std::size_t N>
constexpr decltype(auto) stl_extensions::get (T(&&c_array)[N]) noexcept
 
template<typename CharType , typename T , T... Indices>
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, std::integer_sequence< T, Indices... > const &seq) noexcept
 
template<typename CharType , typename T >
std::basic_ostream< CharType > & stl_extensions::operator>> (std::basic_ostream< CharType > &os, T const &t)
 
template<typename CharType , typename... Types>
std::basic_ostream< CharType > & stl_extensions::operator>> (std::basic_ostream< CharType > &os, std::tuple< Types... > const &t)
 
template<typename... Ls, typename... Rs>
constexpr decltype(auto) stl_extensions::hidden::tuple_cartesian_product (std::tuple< Ls... > const &A, std::tuple< Rs... > const &B)
 
template<typename... Ls, typename R , std::size_t N2>
constexpr decltype(auto) stl_extensions::hidden::tuple_cartesian_product (std::tuple< Ls... > const &A, std::array< R, N2 > const &B)
 
template<typename L , std::size_t N1, typename... Rs>
constexpr decltype(auto) stl_extensions::hidden::tuple_cartesian_product (std::array< L, N1 > const &A, std::tuple< Rs... > const &B)
 
template<typename L , std::size_t N1, typename R , std::size_t N2>
constexpr decltype(auto) stl_extensions::hidden::tuple_cartesian_product (std::array< L, N1 > const &A, std::array< R, N2 > const &B)
 
template<cgt::either_array_or_tuple_flat_c T, cgt::either_array_or_tuple_flat_c S, cgt::either_array_or_tuple_flat_c... Tails>
constexpr decltype(auto) stl_extensions::tuple_cartesian_product (T &&A, S &&B, Tails &&... tails)
 
template<std::size_t SIZE, typename CharType >
void stl_extensions::hidden::print_sequence (std::basic_ostream< CharType > &os, auto Index, auto count)
 
template<class F , typename T , std::size_t N>
constexpr decltype(auto) stl_extensions::apply (F &&f, std::span< T, N > &sp)
 
template<class F , typename T , std::size_t N>
constexpr decltype(auto) stl_extensions::apply (F &&f, const std::span< T, N > &sp)
 
template<class F , typename T , std::size_t N>
constexpr decltype(auto) stl_extensions::apply (F &&f, std::span< T, N > &&sp)
 
template<typename CharType , cgt::stream_undefined_container_flat_c ContainerType>
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, ContainerType &&container)
 
template<typename CharType , cgt::view_flat_c ViewType>
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, ViewType &&view)
 
template<typename CharType , cgt::map_c ContainerType>
std::basic_ostream< CharType > & stl_extensions::operator<< (std::basic_ostream< CharType > &os, const ContainerType &container)
 
template<size_t Index, typename CharType , typename... Types>
void stl_extensions::hidden::print_tuple (std::basic_ostream< CharType > &os, const std::tuple< Types... > &container)
 

Macro Definition Documentation

◆ NOMINMAX

#define NOMINMAX

Definition at line 10 of file cpg_std_extensions.hpp.