Commit af36fcf 1 parent 9f0eb53 commit af36fcf Copy full SHA for af36fcf
File tree 1 file changed +7
-4
lines changed
include/dice/template-library
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ namespace dice::template_library {
47
47
: size_{sv.size ()}, alloc_{alloc} {
48
48
49
49
data_ = std::allocator_traits<allocator_type>::allocate (alloc_, size_);
50
- memcpy (data_, sv.data (), size_);
50
+ memcpy (std::to_address ( data_) , sv.data (), size_);
51
51
}
52
52
53
53
basic_static_string (basic_static_string const &) = delete ;
@@ -82,7 +82,7 @@ namespace dice::template_library {
82
82
data_ = std::allocator_traits<allocator_type>::allocate (alloc_, size_);
83
83
}
84
84
85
- memcpy (data_, other.data_ , size_);
85
+ memcpy (std::to_address ( data_) , other.data_ , size_);
86
86
return *this ;
87
87
}
88
88
}
@@ -94,10 +94,13 @@ namespace dice::template_library {
94
94
}
95
95
96
96
operator view_type () const noexcept {
97
- return {data_, size_};
97
+ return {std::to_address ( data_) , size_};
98
98
}
99
99
100
- [[nodiscard]] value_type const *data () const noexcept {
100
+ [[nodiscard]] const_pointer data () const noexcept {
101
+ return data_;
102
+ }
103
+ [[nodiscard]] pointer data () noexcept {
101
104
return data_;
102
105
}
103
106
You can’t perform that action at this time.
0 commit comments