Skip to content
This repository has been archived by the owner on Apr 6, 2024. It is now read-only.

[Bugs report] Vec::pop is not exception safe #5

Open
iosmanthus opened this issue Aug 5, 2019 · 0 comments
Open

[Bugs report] Vec::pop is not exception safe #5

iosmanthus opened this issue Aug 5, 2019 · 0 comments
Labels
bug Something isn't working medium

Comments

@iosmanthus
Copy link
Contributor

iosmanthus commented Aug 5, 2019

The Vec::pop maybe fail while copying the object.

template <typename T>
std::optional<T> Vec<T>::pop()
{
if (this->len > 0)
return this->buf[this->len-- - 1];
return {};
}

@iosmanthus iosmanthus changed the title [Bugs report] [Bugs report] Vec::pop is not exception safe Aug 5, 2019
@iosmanthus iosmanthus added bug Something isn't working medium labels Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working medium
Projects
None yet
Development

No branches or pull requests

1 participant