diff --git a/include/boost/interprocess/indexes/iunordered_set_index.hpp b/include/boost/interprocess/indexes/iunordered_set_index.hpp index 6cd1452..702ef91 100644 --- a/include/boost/interprocess/indexes/iunordered_set_index.hpp +++ b/include/boost/interprocess/indexes/iunordered_set_index.hpp @@ -89,8 +89,10 @@ struct iunordered_set_index_aux }; struct hash_function - : std::unary_function { + typedef value_type argument_type; + typedef std::size_t result_type; + std::size_t operator()(const value_type &val) const { const char_type *beg = ipcdetail::to_raw_pointer(val.name()), diff --git a/include/boost/interprocess/indexes/unordered_map_index.hpp b/include/boost/interprocess/indexes/unordered_map_index.hpp index 6a5ad5d..ac009f0 100644 --- a/include/boost/interprocess/indexes/unordered_map_index.hpp +++ b/include/boost/interprocess/indexes/unordered_map_index.hpp @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -54,8 +53,10 @@ struct unordered_map_index_aux typename MapConfig:: segment_manager_base> allocator_type; struct hasher - : std::unary_function { + typedef key_type argument_type; + typedef std::size_t result_type; + std::size_t operator()(const key_type &val) const { typedef typename key_type::char_type char_type; diff --git a/test/message_queue_test.cpp b/test/message_queue_test.cpp index c4a9233..72c4ead 100644 --- a/test/message_queue_test.cpp +++ b/test/message_queue_test.cpp @@ -251,7 +251,11 @@ bool test_buffer_overflow() { boost::interprocess::message_queue::remove(test::get_process_id_name()); { +#ifdef BOOST_NO_AUTO_PTR + std::unique_ptr +#else std::auto_ptr +#endif ptr(new boost::interprocess::message_queue (create_only, test::get_process_id_name(), 10, 10)); pmessage_queue = ptr.get();