Fix -Wdangling-reference warnings

This commit is contained in:
Mohammad Nejati
2024-06-01 18:54:19 +03:30
committed by Mohammad Nejati
parent b502789d89
commit eaaeb8b36b
3 changed files with 8 additions and 7 deletions
+3 -2
View File
@@ -23,8 +23,9 @@ public:
void check(char const* name, error ev)
{
auto const ec = make_error_code(ev);
auto const& cat = make_error_code(
static_cast<zlib::error>(0)).category();
auto const ec_zlib = make_error_code(
static_cast<zlib::error>(0));
auto const& cat = ec_zlib.category();
BEAST_EXPECT(std::string{ec.category().name()} == name);
BEAST_EXPECT(! ec.message().empty());
BEAST_EXPECT(