1
0
forked from Alepha/Alepha

We should be using sentry in our generated istream operators.

This commit is contained in:
2024-04-04 13:56:26 -04:00
parent 29575e7e30
commit 58327d5afd

View File

@ -29,6 +29,10 @@ namespace Alepha::Hydrogen::IOStreams ::detail:: IStreamable_m
std::istream & std::istream &
operator >> ( std::istream &is, IStreamableAggregate auto &istreamable ) operator >> ( std::istream &is, IStreamableAggregate auto &istreamable )
{ {
std::istream::sentry sentry{ is };
if( not sentry ) return is;
std::string line; std::string line;
std::getline( is, line ); std::getline( is, line );
const auto commentChar= line.find( "#" ); const auto commentChar= line.find( "#" );