Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::StringLiteralSink< N > Struct Template Reference

Sink that still represents a compile-time string. More...

#include <StringSink.hpp>

Public Member Functions

constexpr StringLiteralSink (const StringLiteral< N > &input)
std::string to_string () const
constexpr StringLiteral< Nto_string_literal () const
Stream operators
template<size_t OtherSize>
constexpr auto operator<< (const char(&rhs)[OtherSize]) const
template<size_t OtherSize>
constexpr auto operator<< (const StringLiteral< OtherSize > &rhs) const
template<impl::RuntimeSinkChunk T>
constexpr auto operator<< (T &&rhs) const
Equality operators
template<size_t OtherSize>
constexpr bool operator== (const char(&other)[OtherSize]) const
template<size_t OtherSize>
constexpr bool operator== (const StringLiteralSink< OtherSize > &other) const
template<size_t OtherSize>
constexpr bool operator== (const StringLiteral< OtherSize > &other) const

Public Attributes

StringLiteral< Nvalue

Static Public Attributes

static constexpr bool is_compile_time = true

Detailed Description

template<size_t N>
struct mundy::StringLiteralSink< N >

This sink is produced when every chunk streamed into mundy::sink() is either a string literal or a mundy::StringLiteral. It supports further literal concatenation at compile time and promotes to StringSink automatically when a runtime value is appended.

Constructor & Destructor Documentation

◆ StringLiteralSink()

template<size_t N>
mundy::StringLiteralSink< N >::StringLiteralSink ( const StringLiteral< N > & input)
inlineexplicitconstexpr

Member Function Documentation

◆ to_string()

template<size_t N>
std::string mundy::StringLiteralSink< N >::to_string ( ) const
inline

◆ to_string_literal()

template<size_t N>
StringLiteral< N > mundy::StringLiteralSink< N >::to_string_literal ( ) const
inlineconstexpr

◆ operator<<() [1/3]

template<size_t N>
template<size_t OtherSize>
auto mundy::StringLiteralSink< N >::operator<< ( const char(&) rhs[OtherSize]) const
inlineconstexpr

◆ operator<<() [2/3]

template<size_t N>
template<size_t OtherSize>
auto mundy::StringLiteralSink< N >::operator<< ( const StringLiteral< OtherSize > & rhs) const
inlineconstexpr

◆ operator<<() [3/3]

template<size_t N>
template<impl::RuntimeSinkChunk T>
auto mundy::StringLiteralSink< N >::operator<< ( T && rhs) const
constexpr

◆ operator==() [1/3]

template<size_t N>
template<size_t OtherSize>
bool mundy::StringLiteralSink< N >::operator== ( const char(&) other[OtherSize]) const
inlineconstexpr

◆ operator==() [2/3]

template<size_t N>
template<size_t OtherSize>
bool mundy::StringLiteralSink< N >::operator== ( const StringLiteralSink< OtherSize > & other) const
inlineconstexpr

◆ operator==() [3/3]

template<size_t N>
template<size_t OtherSize>
bool mundy::StringLiteralSink< N >::operator== ( const StringLiteral< OtherSize > & other) const
inlineconstexpr

Member Data Documentation

◆ is_compile_time

template<size_t N>
bool mundy::StringLiteralSink< N >::is_compile_time = true
staticconstexpr

◆ value

template<size_t N>
StringLiteral<N> mundy::StringLiteralSink< N >::value