Friday, October 15, 2010

Inlined Template Functions

Non-exported templated functions are usually inlined.

Reference: More Exceptional C++ by Herb Sutter. Addison-Wesley, 2002, p. 85.

Dietmar Kuhl (personal communication) pointed out, many class templates in the C++ Standard library are explicitly instantiated, thereby explicitly instantiating their member functions. Their member functions need not be inlined.

No comments:

Post a Comment