
Jody Hagins wrote:
On Wed, 4 Apr 2007 00:43:22 +0000 (UTC) Steven Watanabe <steven@providere-consulting.com> wrote:
There's always explicit instantiation.
Right. However, that's not free either. In fact, it adds significant developer overhead to get all the explicit instantiations right.
Luckily it's only the experts that are worried about this, so it's a slam dunk for them ;-)
Note, I understand the "library implemented in a header" for templates. I still think there's ways to put parts of them in libraries, especially when providing wrappers around system resources.
And how about a non-template class that consists of primarily small inlineable functions the make system access more typesafe? With inlining this sort of wrapper can be very efficient. If it's 'out of line' you may suffer additional execution overhead. I don't think the answer is cut and dried, but I know that if the library forces it out of line the user has no option (without code modifications to the lib). However, if it's inline the user can always make a wrapper if they want to isolate it. Still, I proposed having a Boost level macro so you could decide and not need the wrapper. Jeff