test/util/TestIntrusiveForwardList: implement size() only if options.constant_time_size
is set
This commit is contained in:
parent
175524ad02
commit
6f7dce6dca
@ -178,11 +178,9 @@ public:
|
||||
return head.next == nullptr;
|
||||
}
|
||||
|
||||
constexpr size_type size() const noexcept {
|
||||
if constexpr (constant_time_size)
|
||||
return counter;
|
||||
else
|
||||
return std::distance(begin(), end());
|
||||
constexpr size_type size() const noexcept
|
||||
requires(constant_time_size) {
|
||||
return counter;
|
||||
}
|
||||
|
||||
void clear() noexcept {
|
||||
|
Loading…
Reference in New Issue
Block a user