unused parameter 'e' [-Wunused-parameter] when compiling with -fno-exceptions
andijcr opened this issue · comments
Andrea Barbadoro commented
expected/include/tl/expected.hpp
Line 187 in fd96e45
i get an annoying warning when compiling with -fno-exceptions, in my local copy i solved it by adding after line 190 (void) e;
Warren Buckley commented
Yeah I'm getting the same issue
I fixed the issue by adding the [[maybe_unused]]
attribute:
[[noreturn]] TL_EXPECTED_11_CONSTEXPR void throw_exception( [[maybe_unused]] E&& e )
Alexey Larionov commented
May I draw some attention to this issue again? It can be portably solved as simple as @wbuck suggested , but really helps in my setup without exceptions and with treating warnings as errors.