String expression concatenating the specified string expressions using the specified delimiter. More...
#include <strexpr.h>
Public Member Functions | |
| constexpr | e_concat (G &&glue, Arg &&arg, Args &&...args) |
| Create a string expression concatenating the specified string expressions using the specified delimiter. | |
String expression concatenating the specified string expressions using the specified delimiter.
| K | - character type, deduced from the separator type. |
|
inlineconstexpr |
Create a string expression concatenating the specified string expressions using the specified delimiter.
| glue | - the "glue" used when connecting arguments is inserted between them. |
| arg,args... | - the arguments to be combined, at least two. |
"Glues" the passed arguments, inserting the specified "glue" between them. The connector and arguments can be string literals, string expressions, standard strings. Arguments can also be any type for which there is a conversion to a string expression. (see Converting types to string expressions). For arguments that are themselves string expressions, e_concat stores only a reference to them. This is usually not a problem if the reference is not to a temporary object, or the string expression is materialized now, before ';'. If you need to return e_concat as a string expression from a function, you can force it to preserve string expression arguments over a copy by wrapping them in force_copy{}. See tests/test_tostrexpr.cpp, Method4 for an example. Example