From 532a7d7a9e0336727ec853c9caa2025ef37e8735 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 21 Nov 2021 20:06:14 +1100 Subject: [PATCH] Fix clang C++20 compilation issues --- src/Makefile | 2 +- src/units.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index a8a34f969..63bf18333 100644 --- a/src/Makefile +++ b/src/Makefile @@ -85,7 +85,7 @@ CXXFLAGS += -pedantic -std=c++2a -g -Wall -Wextra -Wno-unused-parameter -Wno-sig compiler := $(shell $(CXX) --version) ifneq (,$(findstring clang,$(compiler))) - CXXFLAGS += -frelaxed-template-template-args + CXXFLAGS += -frelaxed-template-template-args -Wno-ambiguous-reversed-operator else ifneq (,$(findstring g++,$(compiler))) CXXFLAGS += -Wno-init-list-lifetime endif diff --git a/src/units.hh b/src/units.hh index c7c9b8e6c..ae025cb74 100644 --- a/src/units.hh +++ b/src/units.hh @@ -83,7 +83,7 @@ public: { m_value %= other.m_value; return static_cast(*this); } [[gnu::always_inline]] - constexpr friend auto operator==(RealType lhs, RealType rhs) + constexpr friend bool operator==(RealType lhs, RealType rhs) { return lhs.m_value == rhs.m_value; } [[gnu::always_inline]]