The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

387359 (1) [Avatar] Offline
#1
For historical reason, Thrift uses the shared_ptr from Boost instead of C++ STL. It would be great to clarify:
1. Is the latest version of Thrift generated C++ code still depends on shared_ptr from Boost?
2. If still Boost, cite briefly about the historical reason. (e.g. thrift white pager 2007 https://thrift.apache.org/static/files/thrift-20070401.pdf https://issues.apache.org/jira/browse/THRIFT-1753)

Update: This is actually covered in section 11.1.1
randy.abernethy (17) [Avatar] Offline
#2
Looks like you found the answer. Thrift has used boost::shared_ptr from the start. That said, the code base is beginning to switch to std::shared_ptr. Your client code should be largely unaffected and can use either ptr type internally. Of course if the version of the thrift compiler you use generates boost ptrs you will need to have boost headers installed, however the api for boost and std ptr is essentially identical, so you can write client code that does not care which specific type the idl compiler emits.