Thread View: comp.std.c++
1 messages
1 total messages
Started by Jody Goldberg
Fri, 10 Nov 1995 19:53
When must an implictly defined assigment operator be generated
Author: Jody Goldberg
Date: Fri, 10 Nov 1995 19:53
Date: Fri, 10 Nov 1995 19:53
22 lines
1400 bytes
1400 bytes
class A
{
A & operator(A const &); // it is private
};
class B : public A
{
};
// B does not define a copy assignment operator and it is not called in the
// translation unit
// WP 12.8 para 12 states that implicitly defining a copy assigment operator
// makes the program ill formed only if it is called. Can a conformant
// compiler compile the above code without error ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jody+@cmu.edu | - veni vidi nuclei deceiri -
| I came, I saw, I dumped core
---
[ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu.
Contact address: std-c++-request@ncar.ucar.edu. The moderation policy
is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads