I wrote the code below:
using namespace std;
valarray<double> v1 = v0[slice(0,1,5)];
I got an error :
error: `stlp_std::slice_array<_Tp>::slice_array(const stlp_std::slice_array<_Tp>&) [with _Tp = double]' is private
but the code works well in vc8.
why is that happen?
I know it is private, but valarray is his friend.
anybody who could explain it for me?
I will add it to unit tests and keep you inform of the result.
I make a simple fix like this at stl/_valarray.h line: 1204
I add this:
private: // Disable assignment and default constructor
slice_array& operator=(const slice_array&);
I don't know whether this is the common mistake in gcc.
I have test it.and it works well.
I saw that you also post the problem to comp.lang.c++, here is the link:
I have going to apply the same modification as the one in the native MinGW lib to STLport to avoid the Standard defect.