If your DLL has other dependencies and you use the STATIC binding to associate your DLL with them, you can expect your DLL to become larger:
Static Link and Dynamic Link
- Static linking can facilitate the distribution of binary files in various user environments (by sending a larger and more resource-intensive program).
EDIT:
I found the answers in this thread are quite interesting for your problem: Profiling DLL / LIB Bloat
But an interesting experiment would be to make sure that for each instance of the template, the resulting size of the executable file grows linearly. If so, you know that the problem is creating an instance of the template. There's a decent article here that talks about this type of problem and is a refactoring method.
EDIT:
There is a high chance that your problem is with using boost headers. Check this topic to find out why: Why does using boost increase file size?
source share