[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sponsoring request: libgtextutils; - next package I'll work on: libbpp-core



Am Mittwoch, den 29.06.2016, 18:15 +0200 schrieb Gert Wollny:
> Am Mittwoch, den 29.06.2016, 17:24 +0200 schrieb Andreas Tille:
> 
> 
> > 
> > -       return input_stream ;
> > +       return static_cast<bool>(input_stream) ;


Actually, after reading up on this [1] it seems that this is actually
correct, since with -std=c++11 std::istream defines an explicit bool()
operator that would be invoked by the static_cast. 

Nevertheless, returning "input_stream.good()" is equally correct in the
given code snipped. 

Best, 
Gert 

[1]  http://en.cppreference.com/w/cpp/io/basic_ios/operator_bool


Reply to: