diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2015-06-02 16:34:03 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2015-06-02 16:34:03 +0000 |
| commit | 31a473137096b979e5cd297848d46ce72bd924be (patch) | |
| tree | cd12c59f817cdee681138ab4cee850a2bc222507 /libcxx/include/scoped_allocator | |
| parent | 0591d53c88aaed57690a897233e2745d431ef3bf (diff) | |
| download | bcm5719-llvm-31a473137096b979e5cd297848d46ce72bd924be.tar.gz bcm5719-llvm-31a473137096b979e5cd297848d46ce72bd924be.zip | |
Implement the first part of N4258 - allocator_traits<X>::is_always_equal. Also fixes PR#23723
llvm-svn: 238848
Diffstat (limited to 'libcxx/include/scoped_allocator')
| -rw-r--r-- | libcxx/include/scoped_allocator | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator index aa8bece6d33..5864689d1f2 100644 --- a/libcxx/include/scoped_allocator +++ b/libcxx/include/scoped_allocator @@ -38,6 +38,7 @@ public: typedef see below propagate_on_container_copy_assignment; typedef see below propagate_on_container_move_assignment; typedef see below propagate_on_container_swap; + typedef see below is_always_equal; template <class Tp> struct rebind @@ -170,6 +171,14 @@ struct __get_poc_swap<_A0, _Allocs...> __get_poc_swap<_Allocs...>::value; }; +template <class _A0, class ..._Allocs> +struct __get_poc_always_equal<_A0, _Allocs...> +{ + static const bool value = + allocator_traits<_A0>::is_always_equal::value || + __get_poc_always_equal<_Allocs...>::value; +}; + template <class ..._Allocs> class __scoped_allocator_storage; @@ -397,6 +406,11 @@ public: bool, __get_poc_swap<outer_allocator_type, _InnerAllocs...>::value > propagate_on_container_swap; + typedef integral_constant + < + bool, + __get_poc_always_equal<outer_allocator_type, _InnerAllocs...>::value + > is_always_equal; template <class _Tp> struct rebind |

