Description: port codebase to gnu++11.
 Since boost 1.83, it is necessary to build rsem with C++ 2011 standard.  This
 patch bumps the -std=gnu++98 passed by upstream Makefil to -std=gnu++11.  It
 should become unnecessary once upstream bumped to C++ 2011 or later, or when
 the package will not depend on boost anymore, in case this is in upstream's
 agenda; there is a merge request open upstream to bump to -std=gnu++17 in the
 meantime.

Author: Étienne Mollier <emollier@debian.org>
Bug: https://github.com/deweylab/RSEM/pull/96
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056010
Last-Update: 2023-12-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- rsem.orig/Makefile
+++ rsem/Makefile
@@ -12,7 +12,7 @@
 
 # Compilation variables
 CXX = g++
-CXXFLAGS += -std=gnu++98 -Wall -I. -I$(BOOST)
+CXXFLAGS += -std=gnu++11 -Wall -I. -I$(BOOST)
 CPPFLAGS ?=
 
 LDFLAGS ?=
--- rsem.orig/PairedEndHit.h
+++ rsem/PairedEndHit.h
@@ -26,7 +26,7 @@
 
 bool PairedEndHit::read(std::istream& in) {
 	conprb = 0.0;
-    return (in>>sid>>pos>>insertL);
+    return ((bool)(in>>sid>>pos>>insertL));
 }
 
 void PairedEndHit::write(std::ostream& out) {
--- rsem.orig/SingleHit.h
+++ rsem/SingleHit.h
@@ -43,7 +43,7 @@
 
 bool SingleHit::read(std::istream& in) {
 	conprb = 0.0;
-	return (in>>sid>>pos);
+	return ((bool)(in>>sid>>pos));
 }
 
 void SingleHit::write(std::ostream& out) {
--- rsem.orig/buildReadIndex.cpp
+++ rsem/buildReadIndex.cpp
@@ -37,15 +37,15 @@
 		streampos pos = fin.tellg();
 		success = true;
 
-		success = (getline(fin, line));
+		success = ((bool)getline(fin, line));
 		if (!success) continue;
-		success = (getline(fin, line));
+		success = ((bool)getline(fin, line));
 		if (!success) continue;
 
 		if (hasQ) {
-			success = (getline(fin, line));
+			success = ((bool)getline(fin, line));
 			if (!success) continue;
-			success = (getline(fin, line));
+			success = ((bool)getline(fin, line));
 			if (!success) continue;
 		}
 
