////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztaņaga 2004-2006. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_PRINTCONTAINER_HPP #define BOOST_PRINTCONTAINER_HPP #include #include #include #include #include struct PrintValues : public std::unary_function { void operator() (int value) const { std::cout << value << " "; } }; template void PrintContents(const Container &cont, const char *contName) { std::cout<< "Printing contents of " << contName << std::endl; std::for_each(cont.begin(), cont.end(), PrintValues()); std::cout<< std::endl << std::endl; } #include #endif //#ifndef BOOST_PRINTCONTAINER_HPP