Er, no offense, but several of the other answers are wrong or at any rate misleading, in my experience.
The C++ standard does not constrain undefined behavior. The operating system does however normally constrain it. Reason: the behavior is undefined with respect to C++.
... always be careful to never ever ever invoke undefined behavior.
Nonsense. Experience belies this suggestion. C++ programmers often inadvertently invoke undefined behavior during testing. Sometimes I do it on purpose, just to see what happens.
Now, I realize that someone thinks that I am flaunting foolhardiness here, but really, your laptop is hardly more likely to catch on fire with undefined than defined behavior. Undefined behavior in C++ emits assembly code with defined behavior. Think about that. The assembly behavior remains defined. It's just that the C++ standard no longer understands the mechanics.
There are times you want to provoke undefined behavior just to see what's going on on the stack.
If you are in an environment in which it is possible to write a defined C++ program that catches your laptop on fire, then you will have to be careful in any case; but the main problem in that case is a lack of hardware- and/or kernel-based protection.
In sum, don't let the C++ standard confuse you. It's just informing you what its own limits of competence are.