operator-() for valarray
Takanori YOSHIKOSHI
tyoshiko@sci.osaka-cu.ac.jp
Sat Apr 1 00:00:00 GMT 2000
Hi,
I can't compile the following program with gcc-2.95.2 and
libstdc++-2.90.7.
// tmp.cc
#include <valarray>
using namespace std;
int main()
{
valarray<int> v(1, 3);
- v;
}
$ g++ -I/usr/local/include/g++-v3 -L/usr/local/lib tmp.cc
/usr/local/include/g++-v3/bits/valarray_meta.h: In instantiation of `_UnClos<negate,_ValArray,int>':
/usr/local/include/g++-v3/bits/valarray_meta.h:643: instantiated from `_Expr<_UnClos<negate,_ValArray,int>,int>'
/usr/local/include/g++-v3/bits/std_valarray.h:553: instantiated from `valarray<int>::operator -() const'
tmp.cc:9: instantiated from here
/usr/local/include/g++-v3/bits/valarray_meta.h:339: no type named `result_type' in `class _UnBase<negate,valarray<int> >'
Is that a bug?
Best regards,
--
Taka Yoshikoshi
tyoshiko@sci.osaka-cu.ac.jp
More information about the Libstdc++
mailing list