Miscellaneous Container Templates

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

Reported by freshcoast on 2010-09-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MCT
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

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  Edit
Everyone can see this information.

Other bug subscribers