From dfb030da6efbca77f014f7deb2f2ee98b47bac5c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 14 Dec 2016 13:25:55 +0000 Subject: [PATCH] Make container wrapper callback functions mutable It seems at least std::mem_fn callable wrapper type call operator is not guaranteed to be const, so we need to be able to call on a non const object. This should do for now. Fixes #978 --- src/containers.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers.hh b/src/containers.hh index c972d93e..621dd480 100644 --- a/src/containers.hh +++ b/src/containers.hh @@ -101,7 +101,7 @@ struct FilterView Iterator end() const { return {*this, std::end(m_container), std::end(m_container)}; } Container m_container; - Filter m_filter; + mutable Filter m_filter; }; template @@ -158,7 +158,7 @@ struct TransformView Iterator end() const { return {*this, std::end(m_container)}; } Container m_container; - Transform m_transform; + mutable Transform m_transform; }; template