alliedmodders / metamod-source

Metamod:Source - C++ Plugin Environment and Detour Library for the Source Engine
http://www.metamodsource.net/
Other
374 stars 83 forks source link

tenatively update mms to C++17 #128

Closed sapphonie closed 11 months ago

sapphonie commented 11 months ago

https://github.com/alliedmodders/hl2sdk/pull/144 needs merged first

dvander commented 11 months ago
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algo.h:3698:63: error: too many arguments provided to function-like macro invocation
    clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, _Compare __comp)
                                                              ^
/home/runner/work/metamod-source/metamod-source/dependencies/hl2sdk-dota/public/mathlib/mathlib.h:635:9: note: macro 'clamp' defined here
#define clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val)))

Usually we rename clamp to V_clamp in SDKs to avoid hitting this, looks like we forgot dota.

sapphonie commented 11 months ago
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_algo.h:3698:63: error: too many arguments provided to function-like macro invocation
    clamp(const _Tp& __val, const _Tp& __lo, const _Tp& __hi, _Compare __comp)
                                                              ^
/home/runner/work/metamod-source/metamod-source/dependencies/hl2sdk-dota/public/mathlib/mathlib.h:635:9: note: macro 'clamp' defined here
#define clamp(val, min, max) (((val) > (max)) ? (max) : (((val) < (min)) ? (min) : (val)))

Usually we rename clamp to V_clamp in SDKs to avoid hitting this, looks like we forgot dota.

CSGO as well and idk how many other ones.