
John Maddock wrote:
Suppose I want to implement a shared_ptr constructor taking std::unique_ptr. To avoid breaking pre-C++11 compilers, I need to, at least, know whether <memory> contains std::unique_ptr. (I'd also like to know if there's std::ref in <functional> because the specification of the constructor uses it.) But the config library doesn't seem to provide a way. There's no macro for std::unique_ptr, and there's no macro for "generic C++11 compiler and library".
I'd prefer not to get too fine grained about this if possible, but are these the only additions to those headers? If so how about BOOST_NO_0X_HDR_MEMORY and BOOST_NO_0X_HDR_FUNCTIONAL which would mirror the existing macros fairly closely?
No, these are not the only additions; <memory> has at least shared_ptr and weak_ptr in C++11, and <functional> has function, bind, mem_fn, hash. But it looks workable enough. I agree that adding a macro for each and every addition would get unwieldy.