Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
kcenon::thread::detail::constexpr_string< N > Struct Template Reference

Constexpr string utilities for compile-time job naming. More...

#include <template_helpers.h>

Collaboration diagram for kcenon::thread::detail::constexpr_string< N >:
Collaboration graph

Public Member Functions

constexpr constexpr_string (const char(&str)[N])
 
constexpr operator const char * () const
 
constexpr size_t size () const
 

Public Attributes

char data [N]
 

Detailed Description

template<size_t N>
struct kcenon::thread::detail::constexpr_string< N >

Constexpr string utilities for compile-time job naming.

Definition at line 127 of file template_helpers.h.

Constructor & Destructor Documentation

◆ constexpr_string()

template<size_t N>
kcenon::thread::detail::constexpr_string< N >::constexpr_string ( const char(&) str[N])
inlineconstexpr

Definition at line 130 of file template_helpers.h.

130 {
131 for (size_t i = 0; i < N; ++i) {
132 data[i] = str[i];
133 }
134 }

References kcenon::thread::detail::constexpr_string< N >::data.

Member Function Documentation

◆ operator const char *()

template<size_t N>
kcenon::thread::detail::constexpr_string< N >::operator const char * ( ) const
inlineconstexpr

Definition at line 136 of file template_helpers.h.

136{ return data; }

References kcenon::thread::detail::constexpr_string< N >::data.

◆ size()

template<size_t N>
size_t kcenon::thread::detail::constexpr_string< N >::size ( ) const
inlineconstexpr

Definition at line 137 of file template_helpers.h.

137{ return N - 1; } // Exclude null terminator

Member Data Documentation

◆ data


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