[stacktrace.basic.cmp]

# 19 Diagnostics library [[diagnostics]](./#diagnostics)

## 19.6 Stacktrace [[stacktrace]](stacktrace#basic.cmp)

### 19.6.4 Class template basic_stacktrace [[stacktrace.basic]](stacktrace.basic#cmp)

#### 19.6.4.4 Comparisons [stacktrace.basic.cmp]

[ð](#lib:operator==,basic_stacktrace)

`template<class Allocator2>
friend bool operator==(const basic_stacktrace& x, const basic_stacktrace<Allocator2>& y) noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2250)

*Returns*: equal(x.begin(), x.end(), y.begin(), y.end())[.](#1.sentence-1)

[ð](#lib:operator%3c=%3e,basic_stacktrace)

`template<class Allocator2>
friend strong_ordering
  operator<=>(const basic_stacktrace& x, const basic_stacktrace<Allocator2>& y) noexcept;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L2263)

*Returns*: x.size() <=> y.size() if x.size() != y.size();lexicographical_compare_three_way(x.begin(), x.end(), y.begin(), y.end()) otherwise[.](#2.sentence-1)
