Bug 24799 - std::tr1::hash missing inheritance
Summary: std::tr1::hash missing inheritance
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.0.2
: P3 normal
Target Milestone: 4.0.3
Assignee: Paolo Carlini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-11 16:11 UTC by John Maddock
Modified: 2005-11-13 12:21 UTC (History)
1 user (show)

See Also:
Host: linux.x86
Target: linux.x86
Build: linux.x86
Known to work:
Known to fail:
Last reconfirmed: 2005-11-11 16:16:29


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Maddock 2005-11-11 16:11:55 UTC
The function object std::tr1::hash is required to inherit from std::unary_function, but the current implementation doesn't do so.  It's member typedefs result_type and argument_type are therefore not present.

Regards, John Maddock.
Comment 1 Paolo Carlini 2005-11-11 16:16:29 UTC
Confirmed, thanks a lot!
Comment 2 paolo@gcc.gnu.org 2005-11-11 20:10:26 UTC
Subject: Bug 24799

Author: paolo
Date: Fri Nov 11 20:10:20 2005
New Revision: 106796

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106796
Log:
2005-11-11  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/24799
	* include/tr1/functional (hash): Inherit from std::unary_function.
	* testsuite/tr1/6_containers/unordered/hash/24799.cc: New.

	PR libstdc++/24805
	* include/tr1/boost_shared_ptr.h (swap(shared_ptr<>&, shared_ptr<>&),
	swap(weak_ptr<>&, weak_ptr<>&)): Move inside namespace tr1.
	* testsuite/tr1/2_general_utilities/memory/shared_ptr/modifiers/
	24805.cc: New.

	PR libstdc++/24809
	* include/tr1/type_traits (__is_polymorhpic_helper): Adjust destructor.
	* testsuite/tr1/4_metaprogramming/type_properties/is_polymorphic/
	24809.cc: New.


Added:
    trunk/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/modifiers/24805.cc
    trunk/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/is_polymorphic/24809.cc
    trunk/libstdc++-v3/testsuite/tr1/6_containers/unordered/hash/
    trunk/libstdc++-v3/testsuite/tr1/6_containers/unordered/hash/24799.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/tr1/boost_shared_ptr.h
    trunk/libstdc++-v3/include/tr1/functional
    trunk/libstdc++-v3/include/tr1/type_traits

Comment 3 paolo@gcc.gnu.org 2005-11-13 12:19:09 UTC
Subject: Bug 24799

Author: paolo
Date: Sun Nov 13 12:19:01 2005
New Revision: 106864

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106864
Log:
2005-11-13  Douglas Gregor  <doug.gregor@gmail.com>

	PR libstdc++/24818
        * include/tr1/ref_wrap_iterate.h
        (reference_wrapper::operator()()): Don't dereferene the result of
        get() before calling it; it's already a reference.
        * testsuite/tr1/3_function_objects/reference_wrapper/invoke.cc:
        Test nullary calls to reference_wrappers.

2005-11-13  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/24799
	* include/tr1/functional (hash): Inherit from std::unary_function.
	* testsuite/tr1/6_containers/unordered/hash/24799.cc: New.

	PR libstdc++/24805
	* include/tr1/boost_shared_ptr.h (swap(shared_ptr<>&, shared_ptr<>&),
	swap(weak_ptr<>&, weak_ptr<>&)): Move inside namespace tr1.
	* testsuite/tr1/2_general_utilities/memory/shared_ptr/modifiers/
	24805.cc: New.

	PR libstdc++/24809
	* include/tr1/type_traits (__is_polymorhpic_helper): Adjust destructor.
	* testsuite/tr1/4_metaprogramming/type_properties/is_polymorphic/
	24809.cc: New.

Added:
    branches/gcc-4_0-branch/libstdc++-v3/testsuite/tr1/2_general_utilities/memory/shared_ptr/modifiers/24805.cc
    branches/gcc-4_0-branch/libstdc++-v3/testsuite/tr1/4_metaprogramming/type_properties/is_polymorphic/24809.cc
    branches/gcc-4_0-branch/libstdc++-v3/testsuite/tr1/6_containers/unordered/hash/
    branches/gcc-4_0-branch/libstdc++-v3/testsuite/tr1/6_containers/unordered/hash/24799.cc
Modified:
    branches/gcc-4_0-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_0-branch/libstdc++-v3/include/tr1/boost_shared_ptr.h
    branches/gcc-4_0-branch/libstdc++-v3/include/tr1/functional
    branches/gcc-4_0-branch/libstdc++-v3/include/tr1/ref_wrap_iterate.h
    branches/gcc-4_0-branch/libstdc++-v3/include/tr1/type_traits
    branches/gcc-4_0-branch/libstdc++-v3/testsuite/tr1/3_function_objects/reference_wrapper/invoke.cc

Comment 4 Paolo Carlini 2005-11-13 12:21:13 UTC
Fixed for 4.0.3.