Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C++20 compliance to LLGL #86

Merged
merged 5 commits into from
Jul 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions include/LLGL/Container/SmallVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ class LLGL_EXPORT SmallVector
void push_back(value_type&& value)
{
reserve(size() + 1);
//Allocator{}.construct(end(), std::forward<value_type&&>(value));
Allocator alloc;
std::allocator_traits<Allocator>::construct(alloc, end(), std::forward<value_type&&>(value));
++size_;
Expand Down Expand Up @@ -746,7 +745,7 @@ class LLGL_EXPORT SmallVector
for (auto rfrom = reverse_iterator{ to }, rto = reverse_iterator{ from }; rfrom != rto; ++rfrom, ++rdst)
{
/* Copy element from current position 'from' to destination 'dst' and destroy the old one */
std::allocator_traits<Allocator>::construct(alloc, &(*rfrom));
std::allocator_traits<Allocator>::construct(alloc, &(*rdst), *rfrom);
gdianaty marked this conversation as resolved.
Show resolved Hide resolved
std::allocator_traits<Allocator>::destroy(alloc, &(*rfrom));
}
}
Expand Down