shared_ptr.hpp: minor optimization (GCC hotfix)

Use thread_local for dummy objects (doesn't work on MSVC).
Couldn't find better way to remove fake static objects completely.
In a sense that they don't appear in object files.
This commit is contained in:
Nekotekina 2021-04-08 15:38:21 +03:00
parent d10584ac6c
commit 332c512eed

View file

@ -19,7 +19,12 @@ namespace stx
};
template <typename T>
static const fake_t<std::remove_cv_t<T>> sample{};
#ifdef _MSC_VER
static const
#else
static thread_local const
#endif
fake_t<std::remove_cv_t<T>> sample{};
}
template <typename X, typename Y>