diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2018-01-02 17:17:01 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2018-01-02 17:17:01 +0000 |
commit | c58e4723e767281311f1c926228fdf1692ad9ba6 (patch) | |
tree | ed9a548bc2702df067538fb9730d14c9d07d39ec /include/memory | |
parent | 05e705f9ecc348e42a710325743dd3bccbc89569 (diff) |
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).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@321658 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/memory')
-rw-r--r-- | include/memory | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/memory b/include/memory index df221ffa7..d6b427b94 100644 --- a/include/memory +++ b/include/memory @@ -18,7 +18,7 @@ namespace std { 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> struct hash; 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); |