Will you use it?
One Trick with Private Names and Function Templates
by Bartlomiej Filipek
From the article:
Last time in my blog post about How to Share Code with Const and Non-Const Functions in C++ I had a custom type declared and defined in one place (like in a header file). Recently, I tried to separate the declaration from implementation, and I got into a situation where one private function template was left.
In this article, I’d like to show you one trick that allowed me to convert this function template into a non-member function without giving up private details of the class...
Add a Comment
Comments are closed.