diff --git a/include/sp/protocol/MessageBase.h b/include/sp/protocol/MessageBase.h index 849e9cd..fe02a38 100644 --- a/include/sp/protocol/MessageBase.h +++ b/include/sp/protocol/MessageBase.h @@ -122,7 +122,7 @@ class MessageImplFieldsReadBase : public TBase { protected: void ReadImpl(DataBuffer& buffer) override { auto& allFields = this->GetFields(); - std::apply([&buffer, this](T& field) { + std::apply([&buffer, this](auto& field) { this->ReadData(field.GetValue(), buffer); }, allFields); } @@ -133,7 +133,7 @@ class MessageImplFieldsWriteBase : public TBase { protected: void WriteImpl(DataBuffer& buffer) override { auto& allFields = this->GetFields(); - std::apply([&buffer, this](T& field) { + std::apply([&buffer, this](auto& field) { this->WriteData(field.GetValue(), buffer); }, allFields); } diff --git a/xmake.lua b/xmake.lua index 94deb11..71fed3a 100644 --- a/xmake.lua +++ b/xmake.lua @@ -1,6 +1,6 @@ add_rules("mode.debug", "mode.release") -set_languages("c++20") +set_languages("c++17") add_requires("enet6")