microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
7.89k stars 1.63k forks source link

Update SafeInt3.hpp #1795

Closed sushshring closed 3 weeks ago

sushshring commented 3 weeks ago

SafeInt was updated upstream and the definitions of the macros was changed. The SafeInt3.hpp that cpprest includes ends up causing redefinition conflicts with the upstream SafeInt if both are included.

This PR changes the name of the SafeInt macros to prevent that redefinition similar to the SafeInt namespaces in SafeInt3.hpp.

Ideally cpprest should setup an upstream dependency on the SafeInt provided within Vcpkg so that the package manager can handle the conflicts and only pull one version of the header. Since that will be a much larger change, this is a workaround.