This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/24800] New: std::mem_fn returns a function object that does not inherit from std::unary_function/binary_function
- From: "john at johnmaddock dot co dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Nov 2005 16:21:48 -0000
- Subject: [Bug libstdc++/24800] New: std::mem_fn returns a function object that does not inherit from std::unary_function/binary_function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The title say it all really, the function object returned from mem_fn is an
unspecified type that:
"3.5:
2 The simple call wrapper shall be derived from std::unary_function<cv T*, Ret
> when pm is a pointer to
member function with cv-qualifier cv and taking no arguments, where Ret is pm?s
return type.
3 The simple call wrapper shall be derived from std::binary_function<cv T*, T1,
Ret > when pm is a
pointer to member function with cv-qualifier cv and taking one argument of type
T1, where Ret is pm?s return
type."
However my tests indicate that this inheritance is not taking place, and in any
case the nested members result_type and argument_type are not present in the
function object returned.
Regards, John Maddock.
--
Summary: std::mem_fn returns a function object that does not
inherit from std::unary_function/binary_function
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: john at johnmaddock dot co dot uk
GCC build triplet: linux.x86
GCC host triplet: linux.x86
GCC target triplet: linux.x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24800