From c060e1fd069a6b44a9572585f9fab1a0a7fec165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkjak@fjfi.cvut.cz> Date: Sat, 17 Nov 2018 17:08:48 +0100 Subject: [PATCH] Added operator<< for Subrange formatting No idea why it is not needed in the develop branch... --- src/TNL/DistributedContainers/Subrange.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/TNL/DistributedContainers/Subrange.h b/src/TNL/DistributedContainers/Subrange.h index 8cff45b495..1512bd2eea 100644 --- a/src/TNL/DistributedContainers/Subrange.h +++ b/src/TNL/DistributedContainers/Subrange.h @@ -12,6 +12,8 @@ #pragma once +#include <ostream> + #include <TNL/Assert.h> #include <TNL/String.h> #include <TNL/param-types.h> @@ -119,5 +121,12 @@ protected: Index end = 0; }; +// due to formatting in TNL::Assert +template< typename Index > +std::ostream& operator<<( std::ostream& str, const Subrange< Index >& range ) +{ + return str << Subrange< Index >::getType() << "( " << range.getBegin() << ", " << range.getEnd() << " )"; +} + } // namespace DistributedContainers } // namespace TNL -- GitLab