Skip to content

Instantly share code, notes, and snippets.

@kkaefer
Created April 19, 2013 14:23
Show Gist options
  • Save kkaefer/5420683 to your computer and use it in GitHub Desktop.
Save kkaefer/5420683 to your computer and use it in GitHub Desktop.
Use std::shared_ptr without tr1 on glibc++ and libc++
#if defined(_LIBCPP_VERSION)
#include <memory>
#else
#include <tr1/memory>
namespace std { template <typename T> using shared_ptr = tr1::shared_ptr<T>; }
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment