On 10/13/2016 11:09 AM, Vinnie Falco wrote:
On Thu, Oct 13, 2016 at 10:54 AM, Edward Diener
wrote: ...even when you have Boost you might prefer the C++ standard equivalent to avoid the Boost dependency.
There is a greater cost to using Boost types over their C++ equivalent. They often differ in small ways. boost::optional, boost::posix_time, and boost::shared_ptr come to mind, there are others.
When writing code you can assume that a reader will know and understand C++ standard library types (since they are... standard). The same cannot be said about the corresponding Boost types. Admittedly this difference is sometimes slight but it is still present.
For this reason, a standard library type almost always has an advantage even when the Boost type offers improved functionality; standard library types are what all C++ programmers know.
The default in my cxx_dual library is to use the C++ standard library, when it is available, over the Boost equivalent based on the dependency consideration. Your opinion only justifies that default even more. My OP was basically an attempt to ask how others decide and how they program their decision.