@@ -39,12 +39,12 @@ struct Stack {
3939 struct freeobj {
4040 freeobj (memory_resource* mr) : resource(mr) {}
4141 memory_resource* resource{nullptr };
42- void operator ()(o2 ::byte* ptr) { resource->deallocate (ptr, 0 , 0 ); }
42+ void operator ()(std ::byte* ptr) { resource->deallocate (ptr, 0 , 0 ); }
4343 };
4444
4545 public:
46- using allocator_type = boost::container::pmr::polymorphic_allocator<o2 ::byte>;
47- using value_type = o2 ::byte;
46+ using allocator_type = boost::container::pmr::polymorphic_allocator<std ::byte>;
47+ using value_type = std ::byte;
4848 using BufferType = std::unique_ptr<value_type[], freeobj>; // this gives us proper default move semantics for free
4949
5050 Stack () = default ;
@@ -57,16 +57,16 @@ struct Stack {
5757 size_t size () const { return bufferSize; }
5858 allocator_type get_allocator () const { return allocator; }
5959 const BaseHeader* first () const { return reinterpret_cast <const BaseHeader*>(this ->data ()); }
60- static const BaseHeader* firstHeader (o2 ::byte const * buf) { return BaseHeader::get (buf); }
61- static const BaseHeader* lastHeader (o2 ::byte const * buf)
60+ static const BaseHeader* firstHeader (std ::byte const * buf) { return BaseHeader::get (buf); }
61+ static const BaseHeader* lastHeader (std ::byte const * buf)
6262 {
6363 const BaseHeader* last{firstHeader (buf)};
6464 while (last && last->flagsNextHeader ) {
6565 last = last->next ();
6666 }
6767 return last;
6868 }
69- static size_t headerStackSize (o2 ::byte const * buf)
69+ static size_t headerStackSize (std ::byte const * buf)
7070 {
7171 size_t result = 0 ;
7272 const BaseHeader* last{firstHeader (buf)};
@@ -88,7 +88,7 @@ struct Stack {
8888 // / all headers must derive from BaseHeader, in addition also other stacks can be passed to ctor.
8989 template <typename FirstArgType, typename ... Headers,
9090 typename std::enable_if_t <
91- !std::is_convertible<FirstArgType, boost::container::pmr::polymorphic_allocator<o2 ::byte>>::value, int > = 0 >
91+ !std::is_convertible<FirstArgType, boost::container::pmr::polymorphic_allocator<std ::byte>>::value, int > = 0 >
9292 Stack (FirstArgType&& firstHeader, Headers&&... headers)
9393 : Stack(boost::container::pmr::new_delete_resource(), std::forward<FirstArgType>(firstHeader),
9494 std::forward<Headers>(headers)...)
@@ -100,7 +100,7 @@ struct Stack {
100100 Stack (const allocator_type allocatorArg, Headers&&... headers)
101101 : allocator{allocatorArg},
102102 bufferSize{calculateSize (std::forward<Headers>(headers)...)},
103- buffer{static_cast <o2 ::byte*>(allocator.resource ()->allocate (bufferSize, alignof (std::max_align_t ))), freeobj{allocator.resource ()}}
103+ buffer{static_cast <std ::byte*>(allocator.resource ()->allocate (bufferSize, alignof (std::max_align_t ))), freeobj{allocator.resource ()}}
104104 {
105105 inject (buffer.get (), std::forward<Headers>(headers)...);
106106 }
@@ -117,7 +117,7 @@ struct Stack {
117117 constexpr static size_t calculateSize (T&& h) noexcept
118118 {
119119 // if it's a pointer (to a stack) traverse it
120- if constexpr (std::is_convertible_v<T, o2 ::byte*>) {
120+ if constexpr (std::is_convertible_v<T, std ::byte*>) {
121121 const BaseHeader* next = BaseHeader::get (std::forward<T>(h));
122122 if (!next) {
123123 return 0 ;
@@ -143,7 +143,7 @@ struct Stack {
143143
144144 // ______________________________________________________________________________________________
145145 template <typename T>
146- static o2 ::byte* inject (o2 ::byte* here, T&& h, bool more = false ) noexcept
146+ static std ::byte* inject (std ::byte* here, T&& h, bool more = false ) noexcept
147147 {
148148 using headerType = typename std::remove_cv<typename std::remove_reference<T>::type>::type;
149149 if (here == nullptr ) {
@@ -168,7 +168,7 @@ struct Stack {
168168 ::new (static_cast <void *>(here)) headerType (std::forward<T>(h));
169169 reinterpret_cast <BaseHeader*>(here)->flagsNextHeader = more;
170170 return here + h.size ();
171- } else if constexpr (std::is_same_v<headerType, o2 ::byte*>) {
171+ } else if constexpr (std::is_same_v<headerType, std ::byte*>) {
172172 BaseHeader* from{BaseHeader::get (h)};
173173 BaseHeader* last{nullptr };
174174 while (from) {
@@ -188,7 +188,7 @@ struct Stack {
188188
189189 // ______________________________________________________________________________________________
190190 template <typename T, typename ... Args>
191- static o2 ::byte* inject (o2 ::byte* here, T&& h, Args&&... args) noexcept
191+ static std ::byte* inject (std ::byte* here, T&& h, Args&&... args) noexcept
192192 {
193193 bool more = hasNonEmptyArg (args...);
194194 auto alsohere = inject (here, h, more);
@@ -210,7 +210,7 @@ struct Stack {
210210 template <typename T>
211211 static bool hasNonEmptyArg (const T& h) noexcept
212212 {
213- if constexpr (std::is_convertible_v<T, o2 ::byte*>) {
213+ if constexpr (std::is_convertible_v<T, std ::byte*>) {
214214 return get<BaseHeader*>(h);
215215 } else {
216216 if (h.size () > 0 ) {
0 commit comments