[Dune] [#432] [Test Suite] fails to compile lrutest

Dune dune at dune-project.org
Thu Oct 2 16:56:48 CEST 2008


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#432 - [Test Suite] fails to compile lrutest
User who did this - Elias Pipping (pipping)

----------
Replacing the allocator with _Alloc::rebind<std::pair<key_type, iterator>::other, yielding the line

  typedef std::map< key_type, iterator, cmp, _Alloc::rebind<std::pair<key_type, iterator>::other > map_type;

doesn't work for me (see below for the error).

I came across this forum post

  http://forums.sun.com/thread.jspa?threadID=5286643

prompting me to try and replace that line with

  typedef std::map< key_type, iterator, cmp, std::allocator< std::pair<const key_type, iterator> > > map_type;

which works (compiles and succeeds) -- both with apple's gcc and fsf gcc.


The error produced by the first approach is

g++ -DHAVE_CONFIG_H -I. -I../..  -I../..   -g -O2 -Wall -MT lrutest.o -MD -MP -MF .deps/lrutest.Tpo -c -o lrutest.o lrutest.cc
.../../dune/common/lru.hh:31: error: type/value mismatch at argument 4 in template parameter list for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’
.../../dune/common/lru.hh:31: error:   expected a type, got ‘(_Alloc::rebind < std::pair<_Key,typename std::list<std::pair<_T1, _T2>, std::allocator<std::pair<_T1, _T2> > >::iterator>::other)’
.../../dune/common/lru.hh: In instantiation of ‘Dune::lru<int, double, Dune::_lru_default_traits<int, double, std::allocator<double> > >’:
lrutest.cc:9:   instantiated from here
.../../dune/common/lru.hh:42: error: ‘int’ is not a class, struct, or union type
.../../dune/common/lru.hh:43: error: ‘int’ is not a class, struct, or union type
.../../dune/common/lru.hh: In member function ‘typename _Traits::allocator::reference Dune::lru<_Key, _Tp, _Traits>::insert(const typename _Traits::key_type&, typename _Traits::allocator::const_reference) [with _Key = int, _Tp = double, _Traits = Dune::_lru_default_traits<int, double, std::allocator<double> >]’:
lrutest.cc:10:   instantiated from here
.../../dune/common/lru.hh:152: error: subscripted value is neither array nor pointer
.../../dune/common/lru.hh: In member function ‘typename _Traits::allocator::reference Dune::lru<_Key, _Tp, _Traits>::touch(const typename _Traits::key_type&) [with _Key = int, _Tp = double, _Traits = Dune::_lru_default_traits<int, double, std::allocator<double> >]’:
lrutest.cc:23:   instantiated from here
.../../dune/common/lru.hh:173: error: subscripted value is neither array nor pointer
.../../dune/common/lru.hh: In member function ‘const void Dune::lru<_Key, _Tp, _Traits>::pop_front() [with _Key = int, _Tp = double, _Traits = Dune::_lru_default_traits<int, double, std::allocator<double> >]’:
lrutest.cc:26:   instantiated from here
.../../dune/common/lru.hh:100: error: request for member ‘erase’ in ‘((Dune::lru<int, double, Dune::_lru_default_traits<int, double, std::allocator<double> > >*)this)->Dune::lru<int, double, Dune::_lru_default_traits<int, double, std::allocator<double> > >::_index’, which is of non-class type ‘int’
.../../dune/common/lru.hh: In member function ‘const void Dune::lru<_Key, _Tp, _Traits>::pop_back() [with _Key = int, _Tp = double, _Traits = Dune::_lru_default_traits<int, double, std::allocator<double> >]’:
lrutest.cc:29:   instantiated from here
.../../dune/common/lru.hh:109: error: request for member ‘erase’ in ‘((Dune::lru<int, double, Dune::_lru_default_traits<int, double, std::allocator<double> > >*)this)->Dune::lru<int, double, Dune::_lru_default_traits<int, double, std::allocator<double> > >::_index’, which is of non-class type ‘int’
----------

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=432#comment543

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list