
On 20/08/2008, Simonson, Lucanus J <lucanus.j.simonson@intel.com> wrote:
I third the question, should we make separating template declarations from their definitions a preferred practice?
Daniel wrote:
Some libraries don't do this because they still support older compilers where template functions have to be defined inline.
Is this rational still valid for new libraries? I would imagine that there are a number of recent libraries accepted that don't support
the
older compilers for other reasons. I was proposing we make it a preferred practice for ongoing and future development. I would not suggest we revise mature libraries to conform to this style. Do you think that is reasonable?
Dave wrote: Frankly I find that style adds so much syntactic overhead that it seldom benefits readability.
I agree with you that while implementing a template library keeping the definitions in the declaration area is much more convenient and helpful than separating them. It avoids cyclic dependency problems in definitions, it reduces the number of files and it makes writing the code all around easier. Defining a template function of a template class separate from its declaration does require a lot of extra syntactic overhead in the definition, but it certainly doesn't hurt the readability of the declaration, and that is the readability I'm concerned with. Luke _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost