diff --git a/src/TNL/DistributedContainers/Subrange.h b/src/TNL/DistributedContainers/Subrange.h index 8cff45b495e280080252a496c76b69a32705932f..1512bd2eea3610127a8ed4d132662f790e2e566d 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