39 ms·
Unfortunately this doesn't handle the libc++ case, which needs #include <memory> even in C++03. What I ended up doing is something like this: // Ensure th
by ridiculous_fish 11y ago
Unfortunately this doesn't handle the libc++ case, which needs #include <memory> even in C++03.
What I ended up doing is something like this:
// Ensure that _LIBCPP_VERSION is defined if necessary
#include <ciso646>
#if defined(_LIBCPP_VERSION) || __cplusplus > 199711L
// C++11 or libc++
#include <memory>
using std::shared_ptr;
#else
// C++03 or libstdc++
#include <tr1/memory>
using std::tr1::shared_ptr;
#endif