Unit Conversion and Dimensional Analysis Library 3.6.1
A compile-time, header-only C++23 dimensional-analysis library
Loading...
Searching...
No Matches
units::affine::fixed_string< N > Struct Template Reference

A compile-time string usable as a non-type template parameter (the tag of a kind/of). More...

#include <kind.h>

Public Member Functions

constexpr fixed_string (const char(&str)[N]) noexcept
template<std::size_t M>
constexpr bool operator== (const fixed_string< M > &rhs) const noexcept
 Compare two tags of possibly-different length: unequal if the lengths differ, else element-wise.

Public Attributes

char value [N] {}
 the stored characters (including the terminating null)

Detailed Description

template<std::size_t N>
struct units::affine::fixed_string< N >

A compile-time string usable as a non-type template parameter (the tag of a kind/of).

Template Parameters
Nthe length including the terminating null (deduced from the string literal).

Structural (public array), so kind<"radial", U> names a distinct type per spelling and two identical spellings name the SAME type. Comparison works ACROSS lengths — a "radial" and a "straight" (different N) compare unequal rather than failing to compile, so a tag-mismatch constraint (TagL == TagR) is well-formed for any two tags.


The documentation for this struct was generated from the following file:
  • /home/runner/work/units/units/include/units/kind.h