diff options
Diffstat (limited to 'libs/container/test/check_equal_containers.hpp')
-rw-r--r-- | libs/container/test/check_equal_containers.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/container/test/check_equal_containers.hpp b/libs/container/test/check_equal_containers.hpp index ad89e6b4d3..69d642c90e 100644 --- a/libs/container/test/check_equal_containers.hpp +++ b/libs/container/test/check_equal_containers.hpp @@ -23,17 +23,17 @@ namespace test{ //Function to check if both containers are equal template<class MyBoostCont ,class MyStdCont> -bool CheckEqualContainers(MyBoostCont *boostcont, MyStdCont *stdcont) +bool CheckEqualContainers(const MyBoostCont *boostcont, const MyStdCont *stdcont) { if(boostcont->size() != stdcont->size()) return false; typedef typename MyBoostCont::value_type value_type; - typename MyBoostCont::iterator itboost(boostcont->begin()), itboostend(boostcont->end()); - typename MyStdCont::iterator itstd(stdcont->begin()); + typename MyBoostCont::const_iterator itboost(boostcont->begin()), itboostend(boostcont->end()); + typename MyStdCont::const_iterator itstd(stdcont->begin()); typename MyStdCont::size_type dist = (typename MyStdCont::size_type)std::distance(itboost, itboostend); - if(dist != boostcont->size()){ + if(dist != boostcont->size()){ return false; } std::size_t i = 0; @@ -48,7 +48,7 @@ bool CheckEqualContainers(MyBoostCont *boostcont, MyStdCont *stdcont) template<class MyBoostCont ,class MyStdCont> -bool CheckEqualPairContainers(MyBoostCont *boostcont, MyStdCont *stdcont) +bool CheckEqualPairContainers(const MyBoostCont *boostcont, const MyStdCont *stdcont) { if(boostcont->size() != stdcont->size()) return false; @@ -56,8 +56,8 @@ bool CheckEqualPairContainers(MyBoostCont *boostcont, MyStdCont *stdcont) typedef typename MyBoostCont::key_type key_type; typedef typename MyBoostCont::mapped_type mapped_type; - typename MyBoostCont::iterator itboost(boostcont->begin()), itboostend(boostcont->end()); - typename MyStdCont::iterator itstd(stdcont->begin()); + typename MyBoostCont::const_iterator itboost(boostcont->begin()), itboostend(boostcont->end()); + typename MyStdCont::const_iterator itstd(stdcont->begin()); for(; itboost != itboostend; ++itboost, ++itstd){ if(itboost->first != key_type(itstd->first)) return false; |