I want to use boost's json_parser for reading json data and I'm trying to figure out the dependencies I need. I run bcp on 'boost\property_tree\detail\json_parser\read.hpp' and it extracted a bunch of headers along with two cpp files 'smart_ptr/src/sp_collector.cpp' and 'smart_ptr/src/sp_debug_hooks.cpp'.
The question is - do I need those? I successfully built my project without compiling those two files only with the headers and json_parser worked. However I'm not sure about the implications and any code paths that would lead to errors during runtime. Boost's documentation sometimes lists dependencies for different parts of the library but I didn't find it for property tree under http://www.boost.org/doc/libs/1_59_0/doc/html/property_tree.html
If your application linked, then obviously the symbols defined in these translation units are not used.
I suppose the dependency analysis just tracks which libraries are used, and that pulls in Boost Smart Pointers, including the compiled part(s).
However I'm not sure about the implications and any code paths that would lead to errors during runtime
Barring the use of shady dynamic symbol resolution things that are implementation specific, you don't have such worries. I think you're safe because you're not using the refcounted garbage collector that's suported in those TUs.
If you enable the smart pointer debugging hooks, then linking will fail.