On Oct 10, 2011, at 10:24 PM, ranadheer p
We have built a C++ library using Boost and when we try to integrate the library in a binary we are having problem in linking because of “--instances=explicit” option used for building the binary.
There's an old joke in which a patient complains to his doctor: "Doctor, it hurts when I move my arm like this." The doctor replies succinctly: "Then don't move your arm like that." May I ask why you want to enforce explicit template instantiation? Much of Boost consists of metaprogramming, "template magic," in which the compiler is able to perform some pretty amazing feats because of implicit template instantiation. If you were required to research all the internal templates implicitly used by your code and hand-code correct instantiations, I assume it would be easier to hand-code all your functionality in the first place, avoiding Boost. I've never even heard of that switch; I fail to appreciate what you would gain by using it. My advice would be to turn it off and happily use Boost, saving yourself months (if not years) of reinventing equivalent functionality.