Skip to content
  • Raphael Kubo da Costa's avatar
    Properly detect the location of STL's shared_ptr. · f184967a
    Raphael Kubo da Costa authored
    std::shared_ptr is a C++11 feature, whose location (and existence) in STL
    implementations of previous C++ standards varied -- one widespread example
    is GCC's libstdc++, which has a shared_ptr implementation in <tr1/memory>
    that was shipped long before C++11.
    
    However, including it unconditionally breaks the build if any other STL
    implementation (such as libc++) is used instead.
    
    We now check if std::shared_ptr is present in the <memory> header and then
    try std::tr1::shared_ptr as a fallback.
    
    REVIEW:		112434
    f184967a