diff options
| author | Howard Hinnant <hhinnant@apple.com> | 2012-01-19 23:15:22 +0000 |
|---|---|---|
| committer | Howard Hinnant <hhinnant@apple.com> | 2012-01-19 23:15:22 +0000 |
| commit | 21fa1887e08a134ba36db19db0b6f107e7e17afb (patch) | |
| tree | 35ea7f225f8d6899b34efc3c60d1d724744db4c5 | |
| parent | d8186490c1d92183ee8fe9994125bca80ab921f5 (diff) | |
| download | bcm5719-llvm-21fa1887e08a134ba36db19db0b6f107e7e17afb.tar.gz bcm5719-llvm-21fa1887e08a134ba36db19db0b6f107e7e17afb.zip | |
Enable full functionality of shared_ptr<const void> by adding allocator<const void>. Credit to John Hurley for discovering this bug.
llvm-svn: 148508
| -rw-r--r-- | libcxx/include/memory | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libcxx/include/memory b/libcxx/include/memory index 1d7b7456c93..0e14275c114 100644 --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -672,6 +672,17 @@ public: template <class _Up> struct rebind {typedef allocator<_Up> other;}; }; +template <> +class _LIBCPP_VISIBLE allocator<const void> +{ +public: + typedef const void* pointer; + typedef const void* const_pointer; + typedef const void value_type; + + template <class _Up> struct rebind {typedef allocator<_Up> other;}; +}; + // pointer_traits template <class _Tp> |

