public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19076] New: Pointer to member function not matched
@ 2004-12-19  9:57 pcarlini at suse dot de
  2004-12-19 13:40 ` [Bug c++/19076] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: pcarlini at suse dot de @ 2004-12-19  9:57 UTC (permalink / raw)
  To: gcc-bugs

This is not a regression, but seems a serious problem, which, actually, is
blocking a simple implementation of various tr1/type_traits facilities :(

The following simplified testcase fails: for some reason, pointers to member
functions (vs, pointers to member objects) are not matched. ICC has no 
problems at all with it.

//---------------------------------------------
#include <cassert>

template<bool _Tv>
  struct integral_constant
  {
    static const bool               value = _Tv;
  };
typedef integral_constant<true>     true_type;
typedef integral_constant<false>    false_type;

template<typename>
  struct is_member_pointer
  : public false_type { };

template<typename _Tp, typename _Cp>
  struct is_member_pointer<_Tp _Cp::*>
  : public true_type { };

typedef void F();
struct S {};
typedef F S::*PMF;

int main()
{
  assert( is_member_pointer<PMF>::value );
}
//-----------------------------------------------

-- 
           Summary: Pointer to member function not matched
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pcarlini at suse dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: Any
  GCC host triplet: Any
GCC target triplet: Any


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


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

end of thread, other threads:[~2005-02-21 23:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-19  9:57 [Bug c++/19076] New: Pointer to member function not matched pcarlini at suse dot de
2004-12-19 13:40 ` [Bug c++/19076] " pinskia at gcc dot gnu dot org
2004-12-19 20:02 ` bangerth at dealii dot org
2004-12-19 22:19 ` [Bug c++/19076] Pointer to member function not matched to pointer to member template bangerth at dealii dot org
2004-12-20 12:29 ` reichelt at gcc dot gnu dot org
2004-12-20 13:25 ` giovannibajo at libero dot it
2004-12-20 13:40 ` pcarlini at suse dot de
2004-12-20 15:15 ` bangerth at dealii dot org
2004-12-25 18:48 ` giovannibajo at libero dot it
2005-01-20 18:02 ` pinskia at gcc dot gnu dot org
2005-01-21  1:02 ` giovannibajo at libero dot it
2005-01-21  1:05 ` giovannibajo at libero dot it
2005-01-26 10:25 ` pcarlini at suse dot de
2005-02-22  4:02 ` cvs-commit at gcc dot gnu dot org
2005-02-22  7:28 ` 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).