From 4b29d8f4967f02e05b6c87c1124615a1684661bb Mon Sep 17 00:00:00 2001
From: Felix Schindler <felix.schindler@wwu.de>
Date: Fri, 15 Mar 2019 10:22:50 +0100
Subject: [PATCH] [entity] move operator<< to correct scope

---
 dune/xt/grid/entity.hh | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/dune/xt/grid/entity.hh b/dune/xt/grid/entity.hh
index 5ee4cf199..bab4f6f4f 100644
--- a/dune/xt/grid/entity.hh
+++ b/dune/xt/grid/entity.hh
@@ -27,6 +27,20 @@
 #include <python/dune/xt/grid/grids.bindings.hh>
 
 namespace Dune {
+
+
+template <int cd, int dim, class GridImp, template <int, int, class> class EntityImp>
+std::ostream& operator<<(std::ostream& out, const Entity<cd, dim, GridImp, EntityImp>& entity)
+{
+  out << "Entity<" << cd << ", " << dim << ", " << XT::Grid::bindings::grid_name<GridImp>::value() << ">(";
+  out << "{0: [" << entity.geometry().corner(0) << "]";
+  for (int ii = 1; ii < entity.geometry().corners(); ++ii)
+    out << ", " << ii << ": [" << entity.geometry().corner(ii) << "]";
+  out << "})";
+  return out;
+}
+
+
 namespace XT {
 namespace Grid {
 
@@ -46,18 +60,6 @@ void print_entity(const EntityType& entity,
 } // ... print_entity(...)
 
 
-template <int cd, int dim, class GridImp, template <int, int, class> class EntityImp>
-std::ostream& operator<<(std::ostream& out, const Entity<cd, dim, GridImp, EntityImp>& entity)
-{
-  out << "Entity<" << cd << ", " << dim << ", " << bindings::grid_name<GridImp>::value() << ">(";
-  for (size_t ii = 0; ii << entity.geometry().corners() - 1; ++ii)
-    out << Common::to_string(ii) << ": {" << entity.geometry().corner(ii) << "}, ";
-  out << Common::to_string(entity.geometry().corners() - 1) << ": {"
-      << entity.geometry().corner(entity.geometry().corners() - 1) << "})";
-  return out;
-}
-
-
 template <int codim, int worlddim, class GridImp, template <int, int, class> class EntityImp>
 double diameter(const Dune::Entity<codim, worlddim, GridImp, EntityImp>& entity)
 {
-- 
GitLab