Fix a deprecation warning about std::result_of_t

We still have one about std::char_traits<unsigned char> (indirectly through std::basic_string_view) though, but our lord and savouir mniip said we can migrate off of it once we're c++20.
This commit is contained in:
Tamás Bálint Misius 2024-01-21 19:38:27 +01:00
parent 3f503bcb1c
commit 2a43e8aef0
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -1386,7 +1386,7 @@ static int sim_decoSpace(lua_State *L)
template<class Accessor>
struct LuaBlockMapHelper
{
using ItemType = std::remove_reference_t<std::result_of_t<Accessor(Vec2<int>)>>;
using ItemType = std::remove_reference_t<std::invoke_result_t<Accessor, Vec2<int>>>;
};
template<bool Clamp, class Accessor, class ItemType = typename LuaBlockMapHelper<Accessor>::ItemType>