The question is purely theoretical to learn the limit of what can be thrown as exception. Can a reference be thrown? I do not think standard is clear about it. And if possible, then likely to be a reference to a heap object, not the one on the stack that would be out of scope at catch site? Would that work?
Asked
Active
Viewed 42 times
0
-
1From the dup answer `There's no such thing as "throwing by reference". It is simply impossible. There's no syntax for that. Every time you try to "throw a reference", a copy of the referenced object is actually thrown.` – user93353 Sep 18 '13 at 04:55
-
Thanks, user93353, I guess that answered my question. – Apprentice1975 Sep 18 '13 at 05:10