public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/26127]  New: tr1/hashtable compile errors
@ 2006-02-06 14:02 zak at transversal dot com
  2006-02-06 14:19 ` [Bug libstdc++/26127] " chris at bubblescope dot net
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: zak at transversal dot com @ 2006-02-06 14:02 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-02-07 15:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-06 14:02 [Bug libstdc++/26127] New: tr1/hashtable compile errors zak at transversal dot com
2006-02-06 14:19 ` [Bug libstdc++/26127] " chris at bubblescope dot net
2006-02-06 14:34 ` pcarlini at suse dot de
2006-02-07 15:11 ` paolo at gcc dot gnu dot org
2006-02-07 15:11 ` paolo at gcc dot gnu dot org
2006-02-07 15:13 ` pcarlini at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).