Re: Problem with member function template, template type and 'template' keyword

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15 March 2011 20:41, Edward Diener wrote:
> Attempting to compiling the following code using gcc 4.5.2 with the
> -std=c++0x option so I can use static_assert erroneously triggers a
> static_assert "failure in TTest2". Is this a known bug ?

I don't think so, please report it to bugzilla.

It can be reduced to:

struct AType
{
  template<class AA>
    void SomeFuncTemplate()
    { }
};

template < class T >
struct TTest2
{
  template<T> struct helper;

  template<class U>
    static void check(helper<&U::template SomeFuncTemplate<int> > *);
};

int main()
{
  TTest2< void (AType::*)() >::check<AType>(0);
}

This should compile, but doesn't with any version of G++ since at least 4.4


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux