#24 Missing istream include in json_reader.cpp

Unstable (example)
closed-accepted
None
5
2015-03-06
2013-12-04
No

The json_reader.cpp is missing an include of <istream>, needed for
bool Reader::parse(std::istream& sin, ...). Failure to include it
leads to a missing definition of getline for istream.

This include was removed in revision 247 as part of a cleanup of
unnecessary includes of <iostream> to improve binary startup time,
but it should not have been removed in json_reader.cpp (or at least
should have been replaced by an include of <istream>).

Here is the patch:

Index: src/lib_json/json_reader.cpp

--- /src/lib_json/json_reader.cpp (revision 275)
+++ src/lib_json/json_reader.cpp (working copy)
@@ -13,6 +13,7 @@
#include <cstdio>
#include <cassert>
#include <cstring>
+#include <istream>
#include <stdexcept>

#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0

Discussion

  • Quentin Fiard

    Quentin Fiard - 2013-12-04

    Sorry I forgot about escaping the includes '<' '>'. Please find the patch attached.

     
  • Aaron Jacobs

    Aaron Jacobs - 2014-01-29

    Sorry for the delay, and thanks for the patch. Applied in r276.

     
  • Christopher Dunn

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
    
     The json_reader.cpp is missing an include of <istream>, needed for 
     bool Reader::parse(std::istream& sin, ...). Failure to include it
    
    • status: open --> closed-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks