summaryrefslogtreecommitdiff
path: root/libs/interprocess/test/print_container.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/interprocess/test/print_container.hpp')
-rw-r--r--libs/interprocess/test/print_container.hpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/libs/interprocess/test/print_container.hpp b/libs/interprocess/test/print_container.hpp
index eefc6baeb..b045bb42e 100644
--- a/libs/interprocess/test/print_container.hpp
+++ b/libs/interprocess/test/print_container.hpp
@@ -12,33 +12,25 @@
#define BOOST_INTERPROCESS_TEST_PRINTCONTAINER_HPP
#include <boost/interprocess/detail/config_begin.hpp>
-#include <functional>
#include <iostream>
-#include <algorithm>
namespace boost{
namespace interprocess{
namespace test{
-struct PrintValues : public std::unary_function<int, void>
-{
- void operator() (int value) const
- {
- std::cout << value << " ";
- }
-};
-
template<class Container>
void PrintContents(const Container &cont, const char *contName)
{
std::cout<< "Printing contents of " << contName << std::endl;
- std::for_each(cont.begin(), cont.end(), PrintValues());
+ typename Container::iterator b(cont.begin()), e(cont.end());
+ for(; b != e; ++b){
+ std::cout << *b << " ";
+ }
std::cout<< std::endl << std::endl;
}
//Function to dump data
-template<class MyShmCont
- ,class MyStdCont>
+template<class MyShmCont, class MyStdCont>
void PrintContainers(MyShmCont *shmcont, MyStdCont *stdcont)
{
typename MyShmCont::iterator itshm = shmcont->begin(), itshmend = shmcont->end();