GCC Code Coverage Report
Directory: . Exec Total Coverage
File: src/util/ostream_util.cpp Lines: 7 7 100.0 %
Date: 2021-03-23 Branches: 0 0 0.0 %

Line Exec Source
1
/*********************                                                        */
2
/*! \file ostream_util.cpp
3
 ** \verbatim
4
 ** Top contributors (to current version):
5
 **   Tim King
6
 ** This file is part of the CVC4 project.
7
 ** Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8
 ** in the top-level source directory and their institutional affiliations.
9
 ** All rights reserved.  See the file COPYING in the top-level source
10
 ** directory for licensing information.\endverbatim
11
 **
12
 ** \brief Utilities for using ostreams.
13
 **
14
 ** Utilities for using ostreams.
15
 **/
16
#include "util/ostream_util.h"
17
18
#include <ostream>
19
20
namespace CVC4 {
21
22
136
StreamFormatScope::StreamFormatScope(std::ostream& out)
23
136
    : d_out(out), d_format_flags(out.flags()), d_precision(out.precision())
24
{
25
136
}
26
27
272
StreamFormatScope::~StreamFormatScope()
28
{
29
136
  d_out.precision(d_precision);
30
136
  d_out.flags(d_format_flags);
31
136
}
32
33
}  // namespace CVC4