Home > Articles > Programming > C/C++

Designing and Writing Generic Facilities: A C++ Challenge

  • Print
  • + Share This
This chapter provides you with the opportunity to flex your C++ muscles by critiquing a piece of code. Can you find a better way to optimize this code for idiomatic usage? Find out in this challenge from Herb Sutter.
This chapter is from the book

Part of the allure of generic code is its usability and reusability in as many kinds of situations as reasonably possible. How can the simple facility presented in the cited article be stylistically improved, and how can it be made more useful than it is and really qualify as generic and widely usable code?

JG Question

  1. What qualities are desirable in designing and writing generic facilities? Explain.

  • + Share This
  • 🔖 Save To Your Account