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:
committed by
Stefan Seefeld
parent
60cf7f75a2
commit
72ee74900c
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user