diff options
author | Tim King <taking@cs.nyu.edu> | 2018-02-02 17:03:10 -0800 |
---|---|---|
committer | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-02-02 19:03:10 -0600 |
commit | 1b24f3f0fd5fdd4163a46689949fa8a5c60f3322 (patch) | |
tree | d312cd6b42f002a4545e819bb097ada72d6249e0 /src/util/ostream_util.cpp | |
parent | ae5c1a5c3a9c6eb7d1af1a4ddbcb841cf7ce4c70 (diff) |
Restoring ostream format. Resolves a few CIDs 1362780. (#1543)
Diffstat (limited to 'src/util/ostream_util.cpp')
-rw-r--r-- | src/util/ostream_util.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/util/ostream_util.cpp b/src/util/ostream_util.cpp new file mode 100644 index 000000000..3d6eeea01 --- /dev/null +++ b/src/util/ostream_util.cpp @@ -0,0 +1,31 @@ +/********************* */ +/*! \file result.cpp + ** \verbatim + ** Top contributors (to current version): + ** Tim King, Morgan Deters, Andrew Reynolds + ** This file is part of the CVC4 project. + ** Copyright (c) 2009-2017 by the authors listed in the file AUTHORS + ** in the top-level source directory) and their institutional affiliations. + ** All rights reserved. See the file COPYING in the top-level source + ** directory for licensing information.\endverbatim + ** + ** \brief Utilities for using ostreams. + ** + ** Utilities for using ostreams. + **/ +#include "util/ostream_util.h" + +namespace CVC4 { + +StreamFormatScope::StreamFormatScope(std::ostream& out) + : d_out(out), d_format_flags(out.flags()), d_precision(out.precision()) +{ +} + +StreamFormatScope::~StreamFormatScope() +{ + d_out.precision(d_precision); + d_out.flags(d_format_flags); +} + +} // namespace CVC4 |