TartanLlama / expected

C++11/14/17 std::expected with functional-style extensions

Home Page:https://tl.tartanllama.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unused parameter 'e' [-Wunused-parameter] when compiling with -fno-exceptions

andijcr opened this issue · comments

[[noreturn]] TL_EXPECTED_11_CONSTEXPR void throw_exception(E &&e) {

i get an annoying warning when compiling with -fno-exceptions, in my local copy i solved it by adding after line 190 (void) e;

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 )

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.