2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-02 08:52:10 +00:00

#31 if stream is bad then throw

This commit is contained in:
Christian Henning
2018-01-05 10:11:01 -05:00
committed by Stefan Seefeld
parent 60cf7f75a2
commit 72ee74900c

View File

@@ -354,7 +354,14 @@ class istream_device
{
public:
istream_device( std::istream& in )
: _in( in ) {}
: _in( in )
{
if (!in)
{
// does the file exists?
io_error("Stream is not valid.");
}
}
int getc_unchecked()
{