VLink  2.0.0
A high-performance communication middleware
vlink::format::FString< ArgsT > Struct Template Reference

Compile-time format-string wrapper carrying the expected argument list. More...

#include <format.h>

Collaboration diagram for vlink::format::FString< ArgsT >:

Public Types

using t = FString
 

Public Member Functions

template<size_t NumT>
constexpr FString (const char(&s)[NumT])
 
template<typename StrT , std::enable_if_t< std::is_convertible_v< const StrT &, std::string_view >, int > = 0>
constexpr FString (const StrT &s)
 
 operator std::string_view () const
 
std::string_view get () const
 

Public Attributes

std::string_view str
 

Detailed Description

template<typename... ArgsT>
struct vlink::format::FString< ArgsT >

Compile-time format-string wrapper carrying the expected argument list.

Wraps a std::string_view tagged with the argument types so a call site is type-checked implicitly without runtime dispatch. Constructible directly from string literals so format arguments accept "fmt" without a cast.

Template Parameters
ArgsTArgument types expected by the format string (compile-time only).

Member Typedef Documentation

◆ t

template<typename... ArgsT>
using vlink::format::FString< ArgsT >::t = FString

Constructor & Destructor Documentation

◆ FString() [1/2]

template<typename... ArgsT>
template<size_t NumT>
constexpr vlink::format::FString< ArgsT >::FString ( const char(&)  s[NumT])
inlineconstexpr

◆ FString() [2/2]

template<typename... ArgsT>
template<typename StrT , std::enable_if_t< std::is_convertible_v< const StrT &, std::string_view >, int > = 0>
constexpr vlink::format::FString< ArgsT >::FString ( const StrT &  s)
inlineconstexpr

Member Function Documentation

◆ get()

template<typename... ArgsT>
std::string_view vlink::format::FString< ArgsT >::get ( ) const
inline

◆ operator std::string_view()

template<typename... ArgsT>
vlink::format::FString< ArgsT >::operator std::string_view ( ) const
inline

Member Data Documentation

◆ str

template<typename... ArgsT>
std::string_view vlink::format::FString< ArgsT >::str

The documentation for this struct was generated from the following file: