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
No known key found for this signature in database
GPG Key ID: 1E050E141B280628

View File

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