- formatting implemented for floating point types

- fixed some bugs with width and precision specifiers:
    * Evaluation order of nested replacement fields
This commit is contained in:
2025-12-08 12:13:51 -05:00
parent 9645856554
commit 9553f9b662
4 changed files with 168 additions and 48 deletions

View File

@@ -19,6 +19,7 @@
#ifndef FENNEC_TEST_PRINTING_H
#define FENNEC_TEST_PRINTING_H
#include <iomanip>
#include <iostream>
#include <fennec/filesystem/path.h>
@@ -63,17 +64,17 @@ inline std::ostream& operator<<(std::ostream& os, const quaternion<ScalarT>& q)
// Helper for printing strings
inline std::ostream& operator<<(std::ostream& os, const cstring& str) {
return os << str.data();
return os << std::quoted(str.data());
}
// Helper for printing strings
inline std::ostream& operator<<(std::ostream& os, const string& str) {
return os << str.cstr();
return os << std::quoted(str.cstr());
}
// Helper for printing strings
inline std::ostream& operator<<(std::ostream& os, const path& str) {
return os << str.str();
return os << std::quoted(str.cstr());
}
// Helper for printing types