The well-formed program below fails to compile because the gslice assignment operator is inaccessible:
$ cat x.cpp && make x
#include <cstddef>
#include <valarray>
int main ()
{
std::valarray<std::size_t> va;
std::gslice gs (0, va, va);
std::gslice_array<std::size_t> gsa = va [gs];
gsa = gsa;
}
gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include -I/build/sebor/gcc-4.1.0-11s/include -I/build/sebor/dev/stdlib/examples/include -pedantic -nostdinc++ -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long x.cpp
/build/sebor/dev/stdlib/include/valarray: In function 'int main()':
/build/sebor/dev/stdlib/include/valarray:1489: error: 'std::gslice_array<_TypeT>& std::gslice_array<_TypeT>::operator=(const std::gslice_array<_TypeT>&) [with _TypeT = unsigned int]' is private
x.cpp:9: error: within this context
make: *** [x.o] Error 1