This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: 26_numerics fails
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- To: Paolo Carlini <pcarlini at unitus dot it>
- Cc: libstdc++ at gcc dot gnu dot org, gdr at codesourcery dot com, schmid at snake dot iap dot physik dot tu-darmstadt dot edu
- Date: 11 Jan 2002 19:01:19 +0100
- Subject: Re: 26_numerics fails
- Organization: CodeSourcery, LLC
- References: <3C3F18EF.30EB1F8E@unitus.it>
Paolo,
Thanks for the detective work.
| Hi,
|
| thanks to the help of Peter's nice "distillation" work, I'm trying to understand
| more of the valarray regression.
| In Peter PR I find:
|
| template<template<class> class _Oper,
| template<class, class> class _Meta, class _Dom> struct _UnClos;
|
| template<template<class> class _Oper,
| template<class, class> class _Meta1,
| template<class, class> class _Meta2,
| class _Dom1, class _Dom2> class _BinClos;
|
| and then:
|
| template<template<class> class _Oper, typename _Tp>
| struct _BinClos<_Oper,_ValArray,_Constant,_Tp,_Tp>
| : _BinBase2<_Oper,valarray<_Tp> > {
| typedef _BinBase2<_Oper,valarray<_Tp> > _Base;
| typedef typename _Base::value_type value_type;
|
| _BinClos (const valarray<_Tp>& __v, const _Tp& __t)
| : _Base (__v, __t) {}
| };
|
| The testcase would become *compilable* with the current compiler if the the
| _BinClos declaration were changed to:
|
| template<template<class> class _Oper,
| template<class, class> class _Meta1,
| template<class, class> class _Meta2,
| class _Dom1, class _Dom2> struct _BinClos;
| ^^^^^^
Ugh! If that is really the case, then I think the compiler is
broken. In another words, the compiler is saying that given :
class X;
struct X { int i; };
the following is invalid
int main()
{
X x;
x.i = 9;
}
which is quite incorrect. The compiler should be fixed.
-- Gaby