diff --git a/Makefile b/Makefile index 4d0da8d..abce136 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ MAKEFLAGS="-j $(grep -c ^processor /proc/cpuinfo)" -CXXFLAGS:=$(CXXFLAGS) -std=c++20 -Wall -Wextra -Werror=switch +CXXFLAGS:=$(CXXFLAGS) -std=c++20 -Wall -Wextra -Werror=switch -Werror=unused-result CPPFLAGS:=$(CPPFLAGS) -Ilib/expected/ -Ilib/ut/ -Isrc/ Obj=bin/errors.o \ diff --git a/src/musique.hh b/src/musique.hh index 3302df8..732e629 100644 --- a/src/musique.hh +++ b/src/musique.hh @@ -96,7 +96,7 @@ struct Error std::ostream& operator<<(std::ostream& os, Error const& err); template -struct Result : tl::expected +struct [[nodiscard("This value may contain critical error, so it should NOT be ignored")]] Result : tl::expected { using Storage = tl::expected;