Using the library with these compiler flags:
target_compile_options(unit PUBLIC -Werror -Wall -Wextra)
raises the error:
/fifo_map/test/unit.cpp:62:41: error: catching polymorphic type ‘class std::out_of_range’ by value [-Werror=catch-value=]
62 | CHECK_THROWS_AS(m.at("Z"), std::out_of_range);
| ^~~~
/fifo_map/test/unit.cpp:68:42: error: catching polymorphic type ‘class std::out_of_range’ by value [-Werror=catch-value=]
68 | CHECK_THROWS_AS(mc.at("Z"), std::out_of_range);
Using the library with these compiler flags: target_compile_options(unit PUBLIC -Werror -Wall -Wextra)
raises the error: /fifo_map/test/unit.cpp:62:41: error: catching polymorphic type ‘class std::out_of_range’ by value [-Werror=catch-value=] 62 | CHECK_THROWS_AS(m.at("Z"), std::out_of_range); | ^
~~~ /fifo_map/test/unit.cpp:68:42: error: catching polymorphic type ‘class std::out_of_range’ by value [-Werror=catch-value=] 68 | CHECK_THROWS_AS(mc.at("Z"), std::out_of_range);I have made a PR to address this: https://github.com/nlohmann/fifo_map/pull/14