simstr 1.7.3
Yet another strings library
 
Loading...
Searching...
No Matches
simstr::empty_expr< K > Struct Template Reference

An "empty" string expression. More...

#include <strexpr.h>

Inheritance diagram for simstr::empty_expr< K >:
simstr::expr_to_std_string< empty_expr< K > >

Detailed Description

template<typename K>
struct simstr::empty_expr< K >

An "empty" string expression.

Template Parameters
Kis a symbol.

A simple string expression that generates an empty string. Mainly used in the e_choice function when one of the branches should return an empty string. Either to start the addition operation of string expressions when the other operand is not a string expression, but there is an addition operator for it with string expressions. For convenience, constant objects of this type have already been defined for different types of symbols:

  • eea for empty char string
  • eew for empty string wchar_t
  • eeu for empty string char16_t
  • eeuu for empty string char32_t

Example:

// строковые литералы и числа не являются строковыми выражениями, нам надо с чего то начать операцию сложения со строковым выражением
// string literals and numbers are not string expressions, we need to start the addition operation with a string expression somewhere
result = eea + "Count is " + count;
constexpr empty_expr< u8s > eea
Empty string expression of type char.
Definition strexpr.h:850

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