Ticket #41335: patch-shared_ptr.diff

File patch-shared_ptr.diff, 1.2 KB (added by NicosPavlov, 10 years ago)
  • include/openbabel/obmolecformat.h

    diff -ur ../openbabel-2.3.1-orig/include/openbabel/obmolecformat.h ./include/openbabel/obmolecformat.h
    old new  
    2323  #include <hash_map>
    2424#endif
    2525
    26 #if __GNUC__ == 4 && __GNUC_MINOR__ >= 1
     26#include <ciso646>  // detect std::lib
     27#ifdef _LIBCPP_VERSION
     28  #include <unordered_map>
     29#elif __GNUC__ == 4 && __GNUC_MINOR__ >= 1
    2730  #include <tr1/unordered_map>
    2831#elif defined(USE_BOOST)
    2932  #include <boost/tr1/unordered_map.hpp>
  • include/openbabel/shared_ptr.h

    diff -ur ../openbabel-2.3.1-orig/include/openbabel/shared_ptr.h ./include/openbabel/shared_ptr.h
    old new  
    2222#else
    2323  #include <memory>
    2424  #if __GNUC__ == 4  //&& __GNUC_MINOR__ < 3  removed at the suggestion of Konstantin Tokarev
    25     #include <tr1/memory>
     25    #ifdef _LIBCPP_VERSION
     26      using std::shared_ptr;
     27    #else
     28      #include <tr1/memory>
     29      using std::tr1::shared_ptr;
     30    #endif
    2631  #endif
    27   using std::tr1::shared_ptr;
    2832#endif
    2933
    3034#endif // OB_SHARED_PTR_H