Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/include/nanobench.h
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,6 @@ void doNotOptimizeAway(T const& val) {
# include <random> // random_device
# include <sstream> // to_s in Number
# include <stdexcept> // throw for rendering templates
# include <tuple> // std::tie
# if defined(__linux__)
# include <unistd.h> //sysconf
# endif
Expand Down Expand Up @@ -3458,7 +3457,8 @@ double BigO::normalizedRootMeanSquare() const noexcept {
}

bool BigO::operator<(BigO const& other) const noexcept {
return std::tie(mNormalizedRootMeanSquare, mName) < std::tie(other.mNormalizedRootMeanSquare, other.mName);
return (mNormalizedRootMeanSquare < other.mNormalizedRootMeanSquare)
|| (!(mNormalizedRootMeanSquare > other.mNormalizedRootMeanSquare) && mName < other.mName);
}

std::ostream& operator<<(std::ostream& os, BigO const& bigO) {
Expand Down