File tree 2 files changed +13
-9
lines changed
2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -807,12 +807,12 @@ namespace xt
807
807
{
808
808
using base_type = A;
809
809
using value_type = typename A::value_type;
810
- using reference = typename A::reference ;
811
- using const_reference = typename A::const_reference ;
812
- using pointer = typename A ::pointer;
813
- using const_pointer = typename A ::const_pointer;
814
- using size_type = typename A ::size_type;
815
- using difference_type = typename A ::difference_type;
810
+ using reference = value_type& ;
811
+ using const_reference = const value_type& ;
812
+ using pointer = typename std::allocator_traits<A> ::pointer;
813
+ using const_pointer = typename std::allocator_traits<A> ::const_pointer;
814
+ using size_type = typename std::allocator_traits<A> ::size_type;
815
+ using difference_type = typename std::allocator_traits<A> ::difference_type;
816
816
817
817
tracking_allocator () = default ;
818
818
@@ -835,9 +835,13 @@ namespace xt
835
835
return base_type::allocate (n);
836
836
}
837
837
838
- using base_type::construct;
839
838
using base_type::deallocate;
839
+
840
+ // Construct and destroy are removed in --std=c++-20
841
+ #if ((defined(__cplusplus) && __cplusplus < 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG < 202002L))
842
+ using base_type::construct;
840
843
using base_type::destroy;
844
+ #endif
841
845
842
846
template <class U >
843
847
struct rebind
Original file line number Diff line number Diff line change @@ -76,9 +76,9 @@ namespace xt
76
76
{
77
77
public:
78
78
79
- size_t * allocate (size_t n, const void * hint = 0 )
79
+ size_t * allocate (size_t n)
80
80
{
81
- size_t * res = std::allocator<size_t >::allocate (n, hint );
81
+ size_t * res = std::allocator<size_t >::allocate (n);
82
82
// store the size into the result so we can
83
83
// check if the size is correct when we deallocate.
84
84
res[0 ] = n;
You can’t perform that action at this time.
0 commit comments