[CXX-113] C++ driver should not require any boost libs to use Created: 04/Sep/10 Updated: 12/Dec/22 Resolved: 07/Jan/15 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Implementation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Dwight Merriman | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 5 |
| Labels: | cxxmove, legacy-cxx | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Linking with the mongodb c++ driver one might see boost::system::get_system_category if boost libs are not included. I don't see why it is necessary to have anything beyond headers to use the MongoDB C++ driver in practice, so we should try to make that happen. |
| Comments |
| Comment by Adam Midvidy [ 07/Jan/15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
While we have reduced the boost dependencies in the driver as much as possible, it is not reasonable to reduce them entirely without requiring C++11. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 25/Apr/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Here is a collection of boost symbols used in the driver and notes on analogues in C++11.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 24/Apr/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We have actually already eliminated two of the four boost link dependencies on the legacy branch. We no longer depend on filesystem or program_options. We still do depend on boost::thread and boost::system, these are not so easily eliminated in C++03 without writing our own portability wrappers around system primitives for mutexes, threads, etc. That is a significant undertaking and probably not something that we are going to attempt in the legacy driver. Most of our boost dependencies are, interestingly, obviated by C++11. It might be possible to organize things in the driver such that when built in C++11 mode we have no boost dependencies. We would need to audit the existing boost usages and ensure that each had an analogue in C++11. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Dwight Merriman [ 24/Apr/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
i think there are a couple of possible levels of usage. firstly, today, suspect you need the libraries for linking, which is the high end of boost requirements. second, one might imagine using a few boost things that are fairly lightweight like smart pointers, but that's it, and it's all header-only stuff. even better but more effort perhaps would be to use nothing from boost at all. avoiding the libraries for linking might be not too hard. and that would be good as boost lib building can occasionally be a pain on some platforms and it one more thing to deal with. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 10/Mar/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We can evaluate what we are requiring from boost once we have finished stripping the driver down in the new repository. If the dependencies are quite minimal it may be possible, especially if the majority of uses are smart pointer types which we may be able to obtain via tr1 or C++11, or just hand roll. |