26_numerics fails
Gabriel Dos Reis
gdr@codesourcery.com
Fri Jan 11 10:01:00 GMT 2002
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
More information about the Libstdc++
mailing list