cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Placement new operator
Placement new operator
Mar 8, 2012 at 1:35am UTC
n4nature
(245)
Does it make sense to catch for exceptions after placement new operator?
Thanks!
Mar 8, 2012 at 2:18am UTC
kbw
(9488)
Placement does not throw an exception, it doesn't allocate any memory so cannot fail.
Mar 8, 2012 at 2:19am UTC
webJose
(2948)
Well, if I understand correctly, placement new will construct an object, and if that constructor throws an exception, the runtime calls placement delete and the exception has to be trapped.
Topic archived. No new replies allowed.