Book Image

Mastering C++ Programming

By : Jeganathan Swaminathan
Book Image

Mastering C++ Programming

By: Jeganathan Swaminathan

Overview of this book

C++ ? ?has ? ?come ? ?a ? ?long ? ?way ? ?and ? ?has ? ?now ? ?been ? ?adopted ? ?in ? ?several ? ?contexts. Its ? ?key ? ?strengths ? ?are ? ?its ? ?software ? ?infrastructure ? ?and ? ?resource-constrained applications. ? ?The ?C++ ? ?17 ? ?release ? ?will ? ?change ? ?the ? ?way ? ?developers ? ?write code, ? ?and ? ?this ? ?book ? ?will ? ?help ?you ? ?master ? ?your ? ?developing ? ?skills ? ?with ? ?C++. With ? ?real-world, ? ?practical ? ?examples ? ?explaining ? ?each ? ?concept, ? ?the ? ?book ? ?will begin ? ?by ? ?introducing ? ?you ? ?to ? ?the ? ?latest ? ?features ? ?in ? ?C++ ? ?17. ? ?It ? ?encourages clean ? ?code ? ?practices ? ?in ? ?C++ ? ?in ? ?general, ? ?and ? ?demonstrates ? ?the ? ?GUI app-development ? ?options ? ?in ? ?C++. ? ?You’ll ? ?get ? ?tips ? ?on ? ?avoiding ? ?memory ? ?leaks using ? ?smart-pointers. ? ?Next, ? ?you’ll ? ?see ? ?how ? ?multi-threaded ?programming can ? ?help ? ?you ? ?achieve ? ?concurrency ? ?in ? ?your ? ?applications. Moving ? ?on, ? ?you’ll ? ?get ? ?an ? ?in-depth ? ?understanding ? ?of ? ?the ? ?C++ ? ?Standard Template ? ?Library. ? ?We ? ?show ? ?you ? ?the ? ?concepts ? ?of ? ?implementing ? ?TDD ? ?and BDD ? ?in ? ?your ? ?C++ ? ?programs, ? ?and ? ?explore ? ?template-based ? ?generic programming, ? ?giving ? ?you ? ?the ? ?expertise ? ?to ? ?build ? ?powerful ? ?applications. Finally, ? ?we’ll ? ?round ? ?up ? ?with ? ?debugging ? ?techniques ? ?and ? ?best ? ?practices.By ? ?the ? ?end ? ?of ? ?the ? ?book, ? ?you’ll ? ?have ? ?an ? ?in-depth ? ?understanding ? ?of ? ?the language ? ?and ? ?its ? ?various ? ?facets.
Table of Contents (18 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface

What's new in C++17?


The complete list of C++17 features can be found at http://en.cppreference.com/w/cpp/compiler_support#C.2B.2B17_features.

To give a high-level idea, the following are some of the new C++17 features:

  • New auto rules for direct-list-initialization
  • static_assert with no messages
  • Nested namespace definition
  • Inline variables
  • Attributes for namespaces and enumerators
  • C++ exceptions specifications are part of the type system
  • Improved lambda capabilities that give performance benefits on servers
  • NUMA architecture
  • Using attribute namespaces
  • Dynamic memory allocation for over-aligned data
  • Template argument deduction for class templates
  • Non-type template parameters with auto type
  • Guaranteed copy elision
  • New specifications for inheriting constructors
  • Direct-list-initialization of enumerations
  • Stricter expression evaluation order
  • shared_mutex 
  • String conversions

Otherwise, there are many new interesting features that were added to the core C++ language: STL, lambadas, and so on. The new features give a facelift to C++, and starting from C++17, as a C++ developer, you will feel that you are working in a modern programming language, such as Java or C#.

What features are deprecated or removed in C++17?

The following features are now removed in C++17:

  • The register keyword was deprecated in C++11 and got removed in C++17
  • The ++ operator for bool was deprecated in C++98 and got removed in C++17
  • The dynamic exception specifications were deprecated in C++11 and and got removed in C++17