BAN: Make ErrorOr<> have attribute [[nodiscard]]

We don't have to specify it everytime we make function return ErrorOr
This commit is contained in:
Bananymous
2023-02-19 20:10:30 +02:00
parent feaeee11e5
commit 247f03c79e
8 changed files with 37 additions and 37 deletions

View File

@@ -28,8 +28,8 @@ namespace BAN
HashSet<T, HASH>& operator=(const HashSet<T, HASH>&);
HashSet<T, HASH>& operator=(HashSet<T, HASH>&&);
[[nodiscard]] ErrorOr<void> insert(const T&);
[[nodiscard]] ErrorOr<void> insert(T&&);
ErrorOr<void> insert(const T&);
ErrorOr<void> insert(T&&);
void remove(const T&);
void clear();
@@ -42,7 +42,7 @@ namespace BAN
bool empty() const;
private:
[[nodiscard]] ErrorOr<void> rebucket(size_type);
ErrorOr<void> rebucket(size_type);
Vector<T>& get_bucket(const T&);
const Vector<T>& get_bucket(const T&) const;