PrevUpHomeNext

utx::print


utx::print is a very simple and convenient cpp template function to print many different values without worrying about their types.

template <utx::kspt::printable ... R>
void utx::print(const R & ... r);

Include

#include <utxcpp/core.hpp>

Notice

[Note] Note
  • It prints a newline character at the end.
  • It separates each value by a space.
  • concept requirements:
    • Every value must satisfy utx::kspt::printable
    • Basic printable types satisfy utx::kspt::printable
    • Non-basic types must implement operator<< to satisfy utx::kspt::printable

Example

#include <utxcpp/core.hpp>

int main() {
	utx::print(true, ':', 3.14, "kg", "waters"); // With newline end.
}

Last revised: November 24, 2022 at 11:26:05 GMT


PrevUpHomeNext