So to clarify my question... each pattern in infamous GoF book - Design Patterns Elements of Reusable Object-Oriented Software - has its code samples in C++.
A
Authors has used the code as examples, not that they've written production code. Production code are more robust and checks for errors and exceptions. Such books usually don't show these, neither do they contain try-catch block or other business-logic.
The book is intended for ideas, concepts, as to how to design your program to solve commonly occurring software problems, rather than what syntax or code to use. Also, wherever the authors has used raw pointers, you can replace them with smart pointers and the likes (if possible), to make it more robust.
However, dynamic polymorphism can be acheived only through pointers or references, so they're something that're still valid, and used even in production code.
Besides, its also true that in the last decade the way C++ code is written has changed a lot. So you can incorporate these new techniques with the old idea/patterns presented in the GOF's book. For example, Andrei Alexandrescu has used templates to implement many patterns (old patterns) in his book:
Modern C++ Design: Generic Programming and Design Patterns Applied