From 58327d5afdab6c50555096f4e8ecb40698ee3a7c Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Thu, 4 Apr 2024 13:56:26 -0400 Subject: [PATCH] We should be using `sentry` in our generated istream operators. --- IOStreams/IStreamable.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IOStreams/IStreamable.h b/IOStreams/IStreamable.h index 018774f..f80f449 100644 --- a/IOStreams/IStreamable.h +++ b/IOStreams/IStreamable.h @@ -29,6 +29,10 @@ namespace Alepha::Hydrogen::IOStreams ::detail:: IStreamable_m std::istream & operator >> ( std::istream &is, IStreamableAggregate auto &istreamable ) { + std::istream::sentry sentry{ is }; + + if( not sentry ) return is; + std::string line; std::getline( is, line ); const auto commentChar= line.find( "#" );