Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
trace::BaseName< N > Struct Template Reference

Compile-time string wrapper for use as a non-type template parameter. More...

#include <trace.hpp>

Public Member Functions

constexpr BaseName (const char(&str)[N])
 Construct from a string literal.
 
constexpr operator std::string_view () const
 Convert to std::string_view (excluding null terminator).
 

Public Attributes

char value [N]
 The wrapped string literal.
 

Detailed Description

template<size_t N>
struct trace::BaseName< N >

Compile-time string wrapper for use as a non-type template parameter.

Usage: Use as CTStr{"ClassName"} to pass a string literal as a template parameter.

Template Parameters
NThe length of the string literal, including the null terminator.

Constructor & Destructor Documentation

◆ BaseName()

template<size_t N>
constexpr trace::BaseName< N >::BaseName ( const char(&)  str[N])
inlineconstexpr

Construct from a string literal.

Parameters
strThe string literal (e.g., "AsyncTask").

Member Function Documentation

◆ operator std::string_view()

template<size_t N>
constexpr trace::BaseName< N >::operator std::string_view ( ) const
inlineconstexpr

Convert to std::string_view (excluding null terminator).

Member Data Documentation

◆ value

template<size_t N>
char trace::BaseName< N >::value[N]

The wrapped string literal.


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