]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/input.h
Move the definition of Input's operator bool to the header
[libs/datafile.git] / source / input.h
index 6cc53e7af3674ee31fbd18bbff24e3d699830294..7f4dd7b988a3b988911797cde037ab733658e84e 100644 (file)
@@ -23,7 +23,7 @@ public:
        int get();
        int peek();
        unsigned get_line_number() const { return line; }
-       explicit operator bool() const;
+       explicit operator bool() const { return (next>=0 || !in->eof()); }
 };  
 
 } // namespace DataFile