------- Comment #1 from v dot lesk at ic dot ac dot uk  2007-03-02 17:02 -------
//Couldnt include attachment so attaching (short) code here. See next comment
for compiler output.
class A
{
private:
protected:
public:
};

template<typename T>
class C:
  virtual public A
{
 private:
 protected:
 public:
  C();

  template<typename T_OTHER>C(const C<T_OTHER>&);

  C func(const class C<long>&)const;

  operator bool(void)const;
};

template<typename T>
C<T>::
C()
{
}

template<typename T>
template<typename T_OTHER>
C<T>::
C(const C<T_OTHER>&a)
{
}

template<typename T>
C<T>
C<T>::
func(const class C<long>&)const
{
  C<T>result;

  return result;
}

template<typename T>
class D:
  public C<T>
{
private:
protected:
public:
  void func2(void);
};


template<typename T>
void
D<T>::
func2(void)
{
  C<int>a;
  a.func(a);
}

void func3(void)
{
  C<int>a;
  a.func(a);
}

int
main(int argc,const char*const*argv)
{
  return 0;
}


-- 


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

Reply via email to