[Bug c++/3518] default conversion to pointer-to-function is applied to soon (related to DR295)

nathan at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 2 15:28:00 GMT 2004


------- Additional Comments From nathan at gcc dot gnu dot org  2004-04-02 15:27 -------
Here is a shorted test case.
template <typename T> void Foo (const T &);
template <typename T> void Baz (const T (*)());

int &f ();

int main()
{
  Foo (f);
  Baz (f);
}

AFAICT either both calls are good, or both are bad. edg 3.3 accepts the first,
but not the second. I'm asking John Spicer why.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


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



More information about the Gcc-bugs mailing list