Skip to Content
Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions
book

Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions

by Herb Sutter
August 2004
Intermediate to advanced
352 pages
7h 38m
English
Addison-Wesley Professional
Content preview from Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions

Chapter 4. Standard Library Member Functions

Difficulty: 5

Reuse is good, but can you always reuse the standard library with itself? Here is an example that might surprise you, where one feature of the standard library can be used portably with any of your code as much as you like, but it cannot be used portably with the standard library itself.

Solution

Fun with mem_fun

  1. What is std::mem_fun? When would you use it? Give an example.

The standard mem_fun adapter lets you use member functions with ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions

Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions

Herb Sutter
Navigating C++ and Object-Oriented Design

Navigating C++ and Object-Oriented Design

Paul Anderson, Gail Anderson

Publisher Resources

ISBN: 0201760428Purchase book