On Jun 12, 9:23 am, Triple-DES <DenPlettf...@gmail.com> wrote:
> Consider the following code:
> struct C {
> C(int i) : j(i) {}
> int j;
> };
> int main() {
> C c1(42);
> C c = c = c1;
> }
> Does it have well-defined behaviour?
Formally, I don't think so, since you're calling C:

perator=
before having constructed C (and the constructor is not
trivial).
In practice, I don't think it matters, since I don't think you'd
ever want to do this anyway.
--
James Kanze (GABI Software) email:
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34