Question

Considérez une classe d'exception avec un constructeur de copie avec des effets secondaires.

Un compilateur peut-il ignorer le constructeur de copie ici:

try {
    throw ugly_exception();
}
catch(ugly_exception) // ignoring the exception, so I'm not naming it
{ }

Et ça:

try {
    something_that_throws_ugly_exception();
}
catch(ugly_exception) // ignoring the exception, so I'm not naming it
{ }

(Oui, je sais que tout cela est très moche, cela a été inspiré par une autre question)

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top