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



Sebastian Huber <sebastian.hu...@embedded-brains.de> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

  Attachment #28518|0                           |1

        is obsolete|                            |

  Attachment #28527|0                           |1

        is obsolete|                            |



--- Comment #5 from Sebastian Huber <sebastian.hu...@embedded-brains.de> 
2012-10-26 13:28:08 UTC ---

Created attachment 28537

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28537

Test case.



Thanks for the hint to the delta tool.  This is great for automatic test case

reduction.



The test code is now:



template <typename T>

struct A { };



template <typename T>

struct B {

  B(const A<T> T::* p);

  typedef A<T> D;

};



template <typename T>

B<T>::B(const D T::* p) { }



struct C {

  C() : e() {};



  const A<C> e;

};



B<C> g(&C::e);



The crucial thing is the "typedef A<T> D".  It works, if we move it before the

constructor declaration "B(const A<T> T::* p)".  Removing the constructor

definition works also.

Reply via email to