
Edward Diener wrote:
I design a library which, let's say, takes a regex object as parameter to some exported function. If the end-user of my library is compiling in C++11 mode is it more likely that his use of regex will be std::regex or boost::regex ? IMO it is the former. Conversely if the end-user of my library is compiling in C++03 mode is it more likely that his use of regex will be std::regex or boost::regex ? That's a loaded question of course because std::regex won't be available to him if he compiles in C++03 mode. So my preferred usage of regex in my library, all else being equal, is to use boost::regex in C++03 mode and std::regex in C++11 mode.
This makes sense, and the question of dependencies and modular distributions is actually a side show. But you do realize that you'll be breaking your customer's C++03 (presumably tried and tested) code the moment he adds -std=c++11 in order to use a for(:) loop, right?