TartanLlama / expected

C++11/14/17 std::expected with functional-style extensions
https://tl.tartanllama.xyz
Creative Commons Zero v1.0 Universal
1.54k stars 133 forks source link

Fix bug if TL_EXPECTED_EXCEPTIONS_ENABLED were disabled #150

Open NathanWongKodiak opened 1 year ago

NathanWongKodiak commented 1 year ago

Found a bug where when using expected &operator=() while providing an expected value and not allowing exceptions to be used TL_EXPECTED_EXCEPTIONS_ENABLED = false then a variable tmp is set but unused which causes the error error: variable 'tmp' set but not used during C++ compilation.