printer::print - HaxyM/crap GitHub Wiki
Defined in "crap/utility.d/printer.h".
Defined in "crap/utility".
template <class Type, Type ... Values> static std :: ostream&
print(std :: ostream& stream, const std :: string& separator, valueList<Type, Values...> values);
Static member function of printer
class. Prints to passed stream
values stored in passed values
object placing after each separator
. If values
is empty container nothing is send to stream
.
-
Type
- Type of arguments passed inValues...
. -
Values...
- Arguments to be printed.
-
stream
- Stream to send values and separators viaoperator <<
. -
sepqrator
- String palaced (viaoperator <<
) after any value fromvalues
. -
values
- List of values to be printed.
Returns passed stream
.
#include <crap/utility.d/valuelist.h>
#include <crap/utility.d/printer.h>
#include <iostream>
int main()
{
using test = crap :: valueList<unsigned int, 0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u>;
printer :: print(std :: cout, ", ", test{});
return 0;
}
Possible output:
0, 1, 2, 3, 4, 5, 6, 7