I have a file starting with following include but it gives the following below compiler error
error: reference to 'allocator' is ambiguous | typedef allocator void_allocator;
The file is not complete but Please note that The same file compile properly on g++ (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2
What does this allocator ambiguous error mean?
#include <boost/interprocess/managed_shared_memory.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/containers/string.hpp>
#include <iostream>
#include <boost/unordered_map.hpp> //boost::unordered_map
#include <functional> //std::equal_to
#include <boost/functional/hash.hpp> //boost::hash
using namespace boost::interprocess;
//Typedefs of allocators and containers
typedef managed_shared_memory::segment_manager segment_manager_t;
typedef allocator<void, segment_manager_t> void_allocator;
typedef allocator<char, segment_manager_t> char_allocator;
typedef basic_string<char, std::char_traits<char>, char_allocator> char_string;
typedef allocator<int, segment_manager_t> int_allocator;
typedef allocator<float, segment_manager_t> float_allocator;
typedef float complex_data;
Aucun commentaire:
Enregistrer un commentaire