C++ Library Extensions 2022.12.09
To help learn modern C++ programming
tpf_output.hpp File Reference

Stream output operators << are implemented. More...

#include <tpf_conversion.hpp>
#include <tpf_any.hpp>
#include <tpf_bitwise.hpp>
#include <tpf_parallel.hpp>
#include <iostream>
#include <sstream>
#include <functional>
Include dependency graph for tpf_output.hpp:

Go to the source code of this file.

Classes

struct  tpf::output::new_line
 
struct  tpf::output::new_Line
 
struct  tpf::output::flush_stream
 
struct  tpf::output::new_line_flush
 
struct  tpf::output::new_Line_flush
 
class  tpf::output::string_stream
 

Namespaces

namespace  tpf
 Includes subnamespace conversion.
 
namespace  tpf::output
 Stream output operators are defined.
 
namespace  tpf::output::hidden
 Implementations in this scope is meant NOT to be accessed directly by the client.
 

Macros

#define TBB_SUPPRESS_DEPRECATED_MESSAGES   1
 
#define NOMINMAX
 

Typedefs

template<typename CharType , template< typename, typename... > class ContainerType, typename Type , typename... Types>
using tpf::output::hidden::enable_stream_if_not_string_t = std::enable_if_t< types::is_empty_available_v< ContainerType< Type, Types... > > &&!types::is_basic_string_v< ContainerType< Type, Types... > >, std::basic_ostream< CharType > & >
 
using tpf::sstream = output::string_stream
 

Functions

template<typename CharType , typename T >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const tpf::bitwise::bit_pattern< T > &a)
 
template<typename CharType , typename... ElementTypes>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const tpf::types::any< ElementTypes... > &a)
 
template<typename CharType , typename T >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::optional< T > &opt)
 
template<typename CharType , auto N, auto D>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::ratio< N, D > &r)
 
template<typename CharType >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::byte &b)
 
template<typename CharType , auto IndexValue>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::indexer_t< IndexValue > &indexer)
 
template<typename CharType , auto RowValue, auto ColumnValue>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::indexer_2d_t< RowValue, ColumnValue > &indexer)
 
template<typename CharType , auto HeightValue, auto RowValue, auto ColumnValue>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::indexer_3d_t< HeightValue, RowValue, ColumnValue > &indexer)
 
template<typename CharType , typename Type , int Tag>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::tag_type< Type, Tag > &ncw)
 
template<typename CharType , typename Type >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::initializer_list< Type > &init_list)
 
template<typename CharType , template< auto... >class ContainerType, auto... Ints>
std::basic_ostream< CharType > & tpf::output::operator>> (std::basic_ostream< CharType > &os, const ContainerType< Ints... > &seq)
 
template<typename CharType , typename T , auto FirstValue, auto LastValue, size_t CountValue, bool stack_order>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::hidden::st_sequence_info< T, FirstValue, LastValue, CountValue, stack_order > &seq)
 
template<typename CharType , typename T , T... Ints>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::integer_sequence< T, Ints... > &seq)
 
template<typename CharType , typename T , T... Ints>
std::basic_ostream< CharType > & tpf::output::operator>> (std::basic_ostream< CharType > &os, const std::integer_sequence< T, Ints... > &seq)
 
template<typename CharType >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, types::TemplateCategory tc)
 
std::ostream & tpf::output::operator<< (std::ostream &os, const std::wstring &str)
 Feed std::wstring to std::ostream. More...
 
std::ostream & tpf::output::operator<< (std::ostream &os, const wchar_t *str)
 Feed const wchar_t* to std::ostream. More...
 
std::wostream & tpf::output::operator<< (std::wostream &os, const std::string &str)
 Feed std::string to std::wostream. More...
 
template<typename CharType , typename FirstType , typename SecondType >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::pair< FirstType, SecondType > &pr)
 Feed std::pair<FirstType, SecondType> to std::basic_ostream<CharType> More...
 
template<typename CharType , typename... Types>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::tuple< Types... > &tuple)
 
template<typename CharType , typename Type , typename... Types>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::variant< Type, Types... > &variant)
 
template<typename CharType , typename Type_1 , typename Type_2 >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::unique_ptr< Type_1, Type_2 > &ptr)
 
template<typename CharType , typename Type >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::shared_ptr< Type > &ptr)
 
template<typename CharType , typename ElementType , size_t Size>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::array< ElementType, Size > &array)
 
template<typename CharType , template< typename, typename... > class ContainerType, typename Type , typename... Types>
hidden::enable_stream_if_not_string_t< CharType, ContainerType, Type, Types... > tpf::output::operator<< (std::basic_ostream< CharType > &os, const ContainerType< Type, Types... > &container)
 Feed STL container to std::basic_stream<CharType> More...
 
template<typename CharType , typename FirstType , typename SecondType >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::array_wrapper_t< FirstType, SecondType > &array)
 
template<typename CharType , typename... Types>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::type_list_t< Types... > &typelist)
 
template<typename CharType , typename... Types>
void tpf::output::hidden::print_type_list (std::basic_ostream< CharType > &os, const types::type_list_t< Types... > &typelist)
 
template<typename CharType >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::exception &expt)
 
template<typename CharType , template< typename, typename... > class ContainerType, typename... ElementTypes>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::hidden::container_of_variants_class< ContainerType, ElementTypes... > &container)
 
template<typename CharType , template< typename, typename... > class ContainerType, typename... ElementTypes>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::hidden::container_of_tuples_class< ContainerType, ElementTypes... > &container)
 
template<typename CharType , typename ContainerType >
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::reverse_st< ContainerType > &container)
 
template<typename CharType , size_t ElementCount>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const std::byte(&array)[ElementCount])
 
template<typename CharType , typename ElementType , size_t ElementCount>
std::enable_if_t<!types::is_char_v< ElementType >, std::basic_ostream< CharType > & > tpf::output::operator<< (std::basic_ostream< CharType > &os, const ElementType(&array)[ElementCount])
 
template<typename CharType , typename ElementType , size_t ElementCount>
std::basic_ostream< CharType > & tpf::output::operator<< (std::basic_ostream< CharType > &os, const types::reverse_st< ElementType(&)[ElementCount]> &container)
 
constexpr new_line tpf::output::nl ()
 
constexpr new_Line tpf::output::nL ()
 
constexpr flush_stream tpf::output::flush ()
 
constexpr new_line_flush tpf::output::endl ()
 
constexpr new_Line_flush tpf::output::endL ()
 
template<typename T , typename = std::enable_if_t<!(types::is_tag_type_v<T> || types::is_numbers_type_v<T>)>>
sstream & tpf::output::operator>> (sstream &os, T arg)
 
template<template< typename... > class TemplateType, typename... Types>
sstream & tpf::output::operator>> (sstream &os, const TemplateType< Types... > &arg)
 
template<typename Type , int Tag>
sstream & tpf::output::operator>> (sstream &os, const types::tag_type< Type, Tag > &)
 
template<template< auto... > class ContainerType, auto... Ints>
sstream & tpf::output::operator>> (sstream &os, const ContainerType< Ints... > &arg)
 
template<template< typename T, T... > class TemplateType, typename Type , Type... Args, typename = std::enable_if_t<!types::is_tag_type_v<TemplateType<Type, Args...>>>>
sstream & tpf::output::operator>> (sstream &os, const TemplateType< Type, Args... > &)
 
template<typename Type >
string_stream & tpf::output::operator< (string_stream &os, Type &&arg)
 
template<typename Type >
string_stream & tpf::output::operator> (string_stream &os, Type &&arg)
 
template<typename Type , size_t CacheSize>
sstream & tpf::output::operator<< (sstream &os, const tpf::parallel::cache_wrapper< Type, CacheSize > &cw)
 

Variables

constexpr auto tpf::flush = output::flush_stream{}
 
constexpr auto tpf::nl = output::new_line{}
 
constexpr auto tpf::nL = output::new_Line{}
 
constexpr auto tpf::endl = output::new_line_flush{}
 
constexpr auto tpf::endL = output::new_Line_flush{}
 

Detailed Description

Stream output operators << are implemented.

Author
Thomas Kim (Thoma.nosp@m.sKim.nosp@m.@Talk.nosp@m.Play.nosp@m.Fun.c.nosp@m.om)
Version
0.1
Date
2019-04-13

Definition in file tpf_output.hpp.

Macro Definition Documentation

◆ NOMINMAX

#define NOMINMAX

Definition at line 20 of file tpf_output.hpp.

◆ TBB_SUPPRESS_DEPRECATED_MESSAGES

#define TBB_SUPPRESS_DEPRECATED_MESSAGES   1

Definition at line 16 of file tpf_output.hpp.