Issue Details (XML | Word | Printable)

Key: STDCXX-306
Type: Bug Bug
Status: Reopened Reopened
Priority: Major Major
Assignee: Martin Sebor
Reporter: Martin Sebor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

std::gslice copy assignment inaccessible

Created: 06/Dec/06 11:46 PM   Updated: 02/Jun/08 06:15 PM
Return to search
Component/s: 26. Numerics
Affects Version/s: 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1
Fix Version/s: 4.3.0

Time Tracking:
Original Estimate: 4h
Original Estimate - 4h
Remaining Estimate: 4h
Remaining Estimate - 4h
Time Spent: Not Specified
Remaining Estimate - 4h

Environment: All
Issue Links:
Reference
 

Severity: Compiler Error


 Description  « Hide
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



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor added a comment - 11/Dec/06 04:36 PM
Fixed with the referenced patch.

Martin Sebor added a comment - 25/Sep/07 01:02 AM
Darn, somehow, the fix got reverted in a subsequent commit to <valarray>: http://svn.apache.org/viewvc?view=rev&revision=485943

Martin Sebor added a comment - 15/Oct/07 12:21 AM
As in the case of STDCXX-311, there is a question of the intended semantics of the copy assignment operator (see also http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#621). Deferred until 4.2.1 or until it's been made more clear what the intended semantics should be.

Martin Sebor added a comment - 02/Jun/08 06:15 PM
Added 4.2.1 to the list of affected versions and estimated effort.