asio: fix example for compatibility with C++20

Fix deprecated-enum-enum-conversion warning when compiling the
example with C++20
This commit is contained in:
Ivan Grokhotkov
2022-06-03 17:20:03 +02:00
parent 9ff37d122a
commit 157247f98f

View File

@ -18,8 +18,8 @@
class chat_message class chat_message
{ {
public: public:
enum { header_length = 4 }; static constexpr std::size_t header_length = 4;
enum { max_body_length = 512 }; static constexpr std::size_t max_body_length = 512;
chat_message() chat_message()
: body_length_(0) : body_length_(0)