yourWaifu / sleepy-discord

C++ library for the Discord chat client. Please use Rust for new bots
https://yourWaifu.github.io/sleepy-discord/
MIT License
708 stars 93 forks source link

error C2352: 'SleepyDiscord::Snowflake<SleepyDiscord::Server>::operator ==': a call of a non-static member function requires an object #274

Open CohortMinseok opened 1 month ago

CohortMinseok commented 1 month ago

Built using vcpkg as a static library.

Did not have this issue before but as soon as I was updating one of my older projects, I had to adjust this function in the snowflake.h header file on line 73.

Original Code: return operator==(static_cast<DiscordObject>(object));

Adjusted Code: return this->operator==(static_cast<DiscordObject>(object));

Hope this fixes the issue to anyone having this issue.

Visual Studio 2022 SDK Version: 10.0.22621.0 Platform Toolset: v143 C++ Language Standard: C++17 Standard