@@ -247,6 +247,20 @@ public:
247247%% endif
248248
249249
250+ inline size_t width() const { return 0; }
251+ inline void width(size_t) {}
252+ inline size_t precision() const { return fmt_precision; }
253+ inline size_t precision(size_t p) {
254+ size_t old = fmt_precision;
255+ fmt_precision = p;
256+ return old;
257+ }
258+ inline char fill() const { return ' '; }
259+ inline char fill(char) {
260+ return ' ';
261+ }
262+
263+
250264protected:
251265 template< typename T >
252266 void
@@ -273,7 +287,7 @@ protected:
273287 void writeInteger(uint64_t value);
274288%% endif
275289
276- %% if options.with_float
290+ %% if options.with_float
277291 inline void writeFloat(float value)
278292 { writeDouble(static_cast<double>(value)); }
279293 void writeDouble(const double& value);
@@ -303,6 +317,9 @@ private:
303317 { if (c) reinterpret_cast<modm::IOStream*>(arg)->write(c); }
304318 printf_output_gadget_t output_gadget{out_char, this, NULL, 0, INT_MAX};
305319%% endif
320+ %% if options.with_float
321+ size_t fmt_precision = 0;
322+ %% endif
306323};
307324
308325/// @ingroup modm_io
@@ -372,8 +389,5 @@ white(IOStream& ios);
372389} // namespace modm
373390
374391#include "iostream_chrono.hpp"
375- %% if with_eigen
376- #include "iostream_eigen.hpp"
377- %% endif
378392
379393#endif // MODM_IOSTREAM_HPP
0 commit comments