MCT

compile error from linked_hash_set::back() in release 1.1.2

Bug #628994 reported by freshcoast
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MCT
Fix Released
Undecided
Unassigned

Bug Description

I get the following compile error when using 1.1.2 and linked_hash_set::back():

In member function ‘typename mct::impl::closed_hash_table<Bucket, Hash, Equal, Allocator>::value_type& mct::impl::linked_hash_table<Bucket, Hash, Equal, Allocator>::back() [with Bucket = mct::impl::linked_set_bucket<int, false>, Hash = std::tr1::hash<int>, Equal = std::equal_to<int>, Allocator = std::allocator<int>]’:
error.cpp:7: instantiated from here
./mct-1.1.2/include/mct/impl/closed-hash-table.hpp:2361: error: ‘class mct::impl::double_link_storage<true>’ has no member named ‘value’

Here's the failing code:

#include <mct/hash-set.hpp>

int main()
{
   mct::linked_hash_set<int> lru;
   lru.insert(5);
   int foo = lru.back();

   return 0;
}

The same code compiles and executes fine in version 1.0.0. The compiler is gcc version 4.1.2 20071124 (Red Hat 4.1.2-42).

Related branches

Revision history for this message
Paul Pogonyshev (doublep) wrote :

Thank you for the report. I committed a fix together with a few more tests catching this at compilation time.

Changed in libmct:
status: New → Fix Committed
Changed in libmct:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.