From 12fd505cc9992da2ada17a6e58d408f2a617ec99 Mon Sep 17 00:00:00 2001
From: Cristian C Lalescu <Cristian.Lalescu@mpcdf.mpg.de>
Date: Fri, 7 Aug 2020 15:36:53 +0200
Subject: [PATCH] gets rid of comparison warning

---
 cpp/scope_timer.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpp/scope_timer.hpp b/cpp/scope_timer.hpp
index 98c23c80..82673ed3 100644
--- a/cpp/scope_timer.hpp
+++ b/cpp/scope_timer.hpp
@@ -374,7 +374,7 @@ public:
 
         if(myrank != 0){
             const std::string strOutput = myResults.str();
-            assert(strOutput.length() <= std::numeric_limits<int>::max());
+            assert(strOutput.length() <= std::numeric_limits<decltype(strOutput.length())>::max());
             int sizeOutput = int(strOutput.length());
             retMpi = MPI_Send(&sizeOutput, 1, MPI_INT, 0, 99, inComm);
             assert(retMpi == MPI_SUCCESS);
@@ -639,7 +639,7 @@ public:
 
             if(myRank != 0){
                 const std::string strOutput = myResults.str();
-                assert(strOutput.length() <= std::numeric_limits<int>::max());
+                assert(strOutput.length() <= std::numeric_limits<decltype(strOutput.length())>::max());
                 int sizeOutput = int(strOutput.length());
                 retMpi = MPI_Send(&sizeOutput, 1, MPI_INT, 0, 99, inComm);
                 assert(retMpi == MPI_SUCCESS);
-- 
GitLab