public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9282: compiler rejects to get function pointers to static member functions in template arguments
@ 2003-01-14  9:16 Thomas Richter
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Richter @ 2003-01-14  9:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/9282; it has been noted by GNATS.

From: Thomas Richter <thor@math.TU-Berlin.DE>
To: bangerth@dealii.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   nobody@gcc.gnu.org, thor@math.TU-Berlin.DE, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/9282: compiler rejects to get function pointers to static member
 functions in template arguments
Date: Tue, 14 Jan 2003 10:12:45 +0100 (CET)

 Hi,
 
 > State-Changed-From-To: open->analyzed
 > State-Changed-By: bangerth
 > State-Changed-When: Mon Jan 13 09:03:34 2003
 > State-Changed-Why:
 
 /* snip */
 
 Thanks for your message, it's appreciated.
 
 Greetings,
 	Thomas


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

* Re: c++/9282: compiler rejects to get function pointers to static member functions in template arguments
@ 2003-01-13 17:03 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-01-13 17:03 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, thor

Synopsis: compiler rejects to get function pointers to static member functions in template arguments

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Jan 13 09:03:34 2003
State-Changed-Why:
    Confirmed. Here's a simpler testcase:
    --------------------------------
    struct CPU {
        typedef int (*pfun)();
    
        template <pfun step1>
        static int dispatch() {
            return (*step1)();
          }
    
        template<int displacement>
        static int foo();
    };
    
    template int CPU::dispatch<&CPU::foo<2> > ();
    -------------------------
    
    I think it should compile, but does not:
    tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.cc
    x.cc: In static member function `static int CPU::dispatch() [with int
       (*step1)() = CPU::foo() [with int displacement = 2]]':
    x.cc:13:   instantiated from here
    x.cc:6: error: no matching function for call to `CPU::foo()'
    
    This has not worked at least since 2.95.
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9282


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

end of thread, other threads:[~2003-01-14  9:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-14  9:16 c++/9282: compiler rejects to get function pointers to static member functions in template arguments Thomas Richter
  -- strict thread matches above, loose matches on Subject: below --
2003-01-13 17:03 bangerth

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).