Chapter 39. Namespaces, Part 1: Using-Declarations and Using-Directives

Difficulty: 2

Standard C++ includes support for namespaces and name visibility control with using-declarations and using-directives. This Item provides a quick recap, laying the groundwork for the next Item's practical application.

What are using-declarations and using-directives, and how are they used? Give examples. Which is order-dependent?

Solution

Solution

Although C++ changed greatly during standardization, few of the changes the committee made are likely to break existing code. There is one change, however, that will cause nearly all earlier C++ code to fail to compile—the addition ...

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.