blob: 3e2e817c04e7e0c6aecd54390fbc17362efbca4e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "array.h"
namespace vespalib {
template <typename T>
bool Array<T>::operator ==(const Array & rhs) const noexcept
{
bool retval(size() == rhs.size());
for (size_t i(0); retval && (i < _sz); i++) {
if ( ! (*array(i) == rhs[i]) ) {
retval = false;
}
}
return retval;
}
template <typename T>
bool Array<T>::operator != (const Array & rhs) const noexcept {
return !(*this == rhs);
}
}
|