Better support iomanip formated output.

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

The difference between utx::frint and utx::print is that utx::fprint does not print a delim between values, so utx::fprint is implemented to support better iomanip users' own formated data.

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


#include <utxcpp/core.hpp>


[Note] Note
  • It does not print a newline character at the end.
  • It separates each value by a space.
  • It does not separate each value, so you have to insert your own delims, otherwise please use utx::print
  • It supports iomanip format better than io::print
  • 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


#include <utxcpp/core.hpp>

using namespace utx::numbers; // pi, egamma

int main() {
	utx::fprint(std::setprecision(8), pi, ' ', std::setprecision(8), egamma, '\n');

Last revised: June 13, 2022 at 03:08:21 GMT