Implement most of P0607: Inline Variables for the Standard Library. This involved marking a lot of variables as inline (but only for C++17 and later).
llvm-svn: 321658
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 40a01d5314ffc3c5f4c379cd69015f962dde5f72
diff --git a/include/memory b/include/memory
index df221ff..d6b427b 100644
--- a/include/memory
+++ b/include/memory
@@ -18,7 +18,7 @@
{
struct allocator_arg_t { };
-constexpr allocator_arg_t allocator_arg = allocator_arg_t();
+inline constexpr allocator_arg_t allocator_arg = allocator_arg_t();
template <class T, class Alloc> struct uses_allocator;
@@ -631,6 +631,9 @@
template <class T, class D> struct hash<unique_ptr<T, D> >;
template <class T> struct hash<shared_ptr<T> >;
+template <class T, class Alloc>
+ inline constexpr bool uses_allocator_v = uses_allocator<T, Alloc>::value;
+
// Pointer safety
enum class pointer_safety { relaxed, preferred, strict };
void declare_reachable(void *p);