Opened 5 years ago

Last modified 5 years ago

#13017 new Bugs

boost::interprocess::map compilation problem (overloading)

Reported by: gjcarneiro@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.63.0 Severity: Problem
Keywords: Cc: gjcarneiro@…

Description

This code compiles with libboost 1.58, but doesn't compile with 1.62 or 1.63. I tried with g++-6.3 and g++-5.4, both with same result.

#include <cassert>
#include <cstring>

#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/containers/map.hpp>
#include <boost/interprocess/containers/vector.hpp>
#include <boost/interprocess/containers/string.hpp>
#include <boost/interprocess/containers/set.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/unordered_map.hpp>

namespace ipc = boost::interprocess;

typedef ipc::managed_shared_memory::segment_manager segment_manager_t;
typedef ipc::allocator<void, segment_manager_t> void_allocator_t;
typedef ipc::allocator<char, segment_manager_t> char_allocator_t;
typedef ipc::basic_string<char, std::char_traits<char>, char_allocator_t> shared_string_t;

typedef ipc::allocator<shared_string_t, segment_manager_t> string_allocator;
typedef std::pair<shared_string_t, shared_string_t> shared_sport_event_pair_t;
typedef ipc::set<const shared_string_t, std::less<shared_string_t>, string_allocator> shared_bms_set_t;
typedef std::pair<const shared_sport_event_pair_t, shared_bms_set_t> event_index_map_t;
typedef ipc::allocator<event_index_map_t, segment_manager_t> event_index_allocator_t;
typedef ipc::map<shared_sport_event_pair_t, shared_bms_set_t, std::less<shared_sport_event_pair_t>, event_index_allocator_t> shared_event_index_t;


struct SharedState
{
	SharedState(const void_allocator_t &alloc)
		: m_EventIndex(std::less<shared_sport_event_pair_t>(), alloc)
	{
	}

	shared_event_index_t m_EventIndex;
};

Attachments (1)

log (49.5 KB ) - added by gjcarneiro@… 5 years ago.
compilation errors output

Download all attachments as: .zip

Change History (2)

by gjcarneiro@…, 5 years ago

Attachment: log added

compilation errors output

comment:1 by John Maddock, 5 years ago

Component: Noneinterprocess
Owner: set to Ion Gaztañaga
Note: See TracTickets for help on using tickets.