This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Require canonical type comparison for typedefs again.


Hi,

> diff --git a/gcc/testsuite/g++.dg/template/typedef36.C b/gcc/testsuite/g++.dg/template/typedef36.C
> new file mode 100644
> index 0000000..f6155c1
> --- /dev/null
> +++ b/gcc/testsuite/g++.dg/template/typedef36.C
> @@ -0,0 +1,23 @@
> +// Origin: PR c++/45606
> +// { dg-do compile }
> +
> +#include <list>
> +
> +template<class T>
> +class Test
> +{
> +protected:
> +  typedef std::list<T> ListAlias;
> +  ListAlias list;
> +public:
> +  typedef typename ListAlias::const_iterator const_iterator;
> +  inline const_iterator begin() const;
> +
> +};
> +
> +template<class T>
> +inline typename std::list<T>::const_iterator Test<T>::begin() const
> +{
> +  return list.begin();
> +}
> +

Once again, if, thanks to the analysis you did to fix the problem, you are able to quickly figure out a shorter testcase, not including the entire <list>, I think it would be good.

Thanks,
Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]