There are a couple of minor errors in tr1/hashtable that cause some of the
rarely-instantiated members defined in TR1
(http://open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf) not to compile,
eg:

std::tr1::unordered_set< int > s;

s.key_eq();    // Not declared:

// error: 'class std::tr1::unordered_set<int, std::tr1::hash<int>,
// std::equal_to<int>, std::allocator<int>, false>' has no member
// named 'key_eq'

// (The function simply isn't there.)


s.bucket(42);  // Implementation fails to compile:

//
/opt/gcc-svn/trunk/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/tr1/hashtable:1099:
 
// error: no matching function for call to 'std::tr1::hashtable<int, int,
// std::allocator<int>, Internal::identity<int>, std::equal_to<int>,
// std::tr1::hash<int>, Internal::mod_range_hashing,
// Internal::default_ranged_hash, Internal::prime_rehash_policy, false, false,
// true>::bucket_index(const int&, <unknown type>, const size_t&) const

// (Missing parentheses on function call.)


s.max_load_factor();

//
/opt/gcc-svn/trunk/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/tr1/hashtable:656:
error: base operand of '->' has non-pointer type 'const
Internal::prime_rehash_policy'

// (member access using -> instead of .)


The above applies to the 4.0 branch and current trunk. (Line numbers above are
from trunk.)

Patches to follow.


-- 
           Summary: tr1/hashtable compile errors
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zak at transversal dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26127

Reply via email to