There is a new version about to surface. In that version, the lower static definition, at line 704 now uses the type
typename shared<alloc_key, alloc_addr>::mappings_t to be consistent with the earlier definitiion of mappings.
In the error messagse above, the stat structure at line 704 seems to be taking template parameter, but stat is just a normal structure which does not take parameters. Looks like a compiler issue. Don't see a problem.
perror is defined in error.h which is included in shared_memory.h
Marc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The allocator uses template parameter values, not just types, so you may need a compiler or OS upgrade. I am using
gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Marc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
cc -c -g -pg -Wall -ftemplate-depth-30 -I../include shared_memory.cc -o shared_memory.o
In file included from shared_memory.cc:21:
../include/shared_memory.h:704: conflicting types for `class map<basic_string<char,string_char_traits<char>,__default_alloc_t
emplate<true,0> >,pair<void *,mem_space::stat<alloc_key,alloc_addr> >,less<basic_string<char,string_char_traits<char>,__defau
lt_alloc_template<true,0> > >,allocator<pair<void *,mem_space::stat<alloc_key,alloc_addr> > > > mem_space::shared<alloc_key,a
lloc_addr>::mappings'
../include/shared_memory.h:641: previous declaration as `class map<basic_string<char,string_char_traits<char>,__default_alloc
_template<true,0> >,pair<void *,mem_space::stat>,less<basic_string<char,string_char_traits<char>,__default_alloc_template<tru
e,0> > >,allocator<pair<void *,mem_space::stat> > > mem_space::shared<alloc_key,alloc_addr>::mappings'
shared_memory.cc: In method `mem_space::locks::locks(const char *const &, const int &)':
shared_memory.cc:50: implicit declaration of function `int mem_space::perror(...)'
make[1]: *** [shared_memory.o] Error 1
There is a new version about to surface. In that version, the lower static definition, at line 704 now uses the type
typename shared<alloc_key, alloc_addr>::mappings_t to be consistent with the earlier definitiion of mappings.
In the error messagse above, the stat structure at line 704 seems to be taking template parameter, but stat is just a normal structure which does not take parameters. Looks like a compiler issue. Don't see a problem.
perror is defined in error.h which is included in shared_memory.h
Marc
sorry, my gcc version is 2.95.3
Can I complie it ?
The allocator uses template parameter values, not just types, so you may need a compiler or OS upgrade. I am using
gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Marc