From e13cfb57260fe2828f9ff40b0f1eaebfe22ad1fe Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 9 Jun 2017 18:28:33 -0600 Subject: [PATCH] Save the state of the stream we're going to write into. --- source/base/parameter_handler.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/base/parameter_handler.cc b/source/base/parameter_handler.cc index 9d2f8b9995..6656ef8ea0 100644 --- a/source/base/parameter_handler.cc +++ b/source/base/parameter_handler.cc @@ -24,6 +24,8 @@ DEAL_II_DISABLE_EXTRA_DIAGNOSTICS #include #include #include + +#include DEAL_II_ENABLE_EXTRA_DIAGNOSTICS #include @@ -2265,6 +2267,14 @@ ParameterHandler::print_parameters (std::ostream &out, { AssertThrow (out, ExcIO()); + // we'll have to print some text that is padded with spaces; + // set the appropriate fill character, but also make sure that + // we will restore the previous setting (and all other stream + // flags) when we exit this function + boost::io::ios_flags_saver restore_flags(out); + boost::io::basic_ios_fill_saver restore_fill_state(out); + out.fill(' '); + // we treat XML and JSON is one step via BOOST, whereas all of the others are // done recursively in our own code. take care of the two special formats // first -- 2.39.5