Chapter 40. Namespaces, Part 2: Migrating to Namespaces
Difficulty: 4
What's the best way to use C++'s powerful namespace management facilities while avoiding traps and pitfalls? Further, what's the most effective way to initially migrate your existing C++ code to a namespace-aware compiler and library?
You are working on a MLOC (million-lines-of-code) project with more than 1,000 .h
and .cpp
files. The project team is just upgrading to the latest version of your compiler, which finally both supports namespaces and puts all the standard library features into namespace std
(or your compiler already had namespace support, but until now your team has been using legacy pre-namespace headers such as <vector.h>
). Unfortunately, this conformance boon (or ...
Get More Exceptional C++ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.