Boost logo

Boost Users :

Subject: [Boost-users] Improving extern template usage
From: Jens Auer (jensa_at_[hidden])
Date: 2011-01-04 08:46:39


Hi,

I've been playing around with the extern template implementation of Visual C++ (2005 and 2010) to reduce our overly long build times. Microsoft's implementation does only omit implicit definitions for member functions not defined inline in the class body. This makes the feature rather useless to reduce build times, as most functions in the boost library (and Microsoft's STL) seem to be declared inline and get implicitly instantiated every time, thus forcing the linker to remove them which is quite costly. This behavior is also perfectly valid with the standard where an exception is made for member functions of template classes defined inline. Would it be reasonable to change the coding guidelines to only define trivial member functions in the class body and provide the definitions separatly after the class declaration? I think gcc does implicitly sinatntiate these member functions, but the MS compilers are widely used and a large number of users would benefit.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net