diff --git a/python/pystencils_walberla/templates/Boundary.tmpl.h b/python/pystencils_walberla/templates/Boundary.tmpl.h
index daf3e0c9668e82c271f0c65368c1331633e9c022..8a673d32e1734b33185f683c69bf2f08e4fda65f 100644
--- a/python/pystencils_walberla/templates/Boundary.tmpl.h
+++ b/python/pystencils_walberla/templates/Boundary.tmpl.h
@@ -70,7 +70,7 @@ public:
         };
 
         IndexVectors() = default;
-        bool operator==(IndexVectors & other) { return other.cpuVectors_ == cpuVectors_; }
+        bool operator==(IndexVectors const &other) const { return other.cpuVectors_ == cpuVectors_; }
 
         {% if target == 'gpu' -%}
         ~IndexVectors() {