The same reasoning that would lead one to inline non-templated functions.
It's not just boost. Generally template functions are inlined (often
implicitly, without the use of the "inline" keyword). Since all of a
program's template instances are not generally known until all
translation units have been compiled, the template function definition
needs to be accessible wherever the function is instantiated. For an
alternative approach look up the "export" keyword, but know that this
feature is not widely supported (Comeau, I believe, being the well-known
exception to this).
If you mean that templated functions are /always/ inlined, then you would be
mistaken. The compiler/linker is required to gather all instantiations of a
templated function, and consolidate them into one implementation, which may
not be inlined.
If you mean that templated functions are /more likely/ to be automatically
inlined, then you're probably technically correct. A very small templated
function would likely be automatically inlined, while a very small
non-templated function might be impossible to inline because its
implementation may not be visible to the caller. However, I don't think
compilers generally favor templated functions for inlining just because
they're templated. Note that taking the address of the function, etc. will
still force a non-inlined instance to be created.
With Whole Program Optimization available on many compilers these days, the
inlining potential of templated and non-templated functions are probably
exactly the same.
-dr