From 89b6c2b288c0bfe336a720ff9007ec016542b529 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Tue, 31 May 2011 18:13:13 +0000 Subject: [PATCH] # make noboost`s BOOST_FOREACH work with const containers git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1024 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/BoostWorkaround/boost/foreach.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/BoostWorkaround/boost/foreach.hpp b/code/BoostWorkaround/boost/foreach.hpp index 205e888f5..e1d8d15d8 100644 --- a/code/BoostWorkaround/boost/foreach.hpp +++ b/code/BoostWorkaround/boost/foreach.hpp @@ -76,6 +76,12 @@ typename T::reference deref(auto_any_base const& cur, T&) return *auto_any_cast(cur); } +template +typename T::const_reference deref(auto_any_base const& cur, const T&) +{ + return *auto_any_cast(cur); +} + } // end foreach_detail ///////////////////////////////////////////////////////////////////////////////