From fcc095b05c500d02de0eaa6b936fbb8c346106be Mon Sep 17 00:00:00 2001 From: Ameya Deshpande Date: Mon, 22 Nov 2021 17:29:07 +0530 Subject: [PATCH] core: Use std::invoke_result instead of std::result_of C++17 introduces `std::invoke_result`, and deprecates the usage of `std::result_of`. Signed-off-by: Ameya Deshpande --- src/core/model/attribute-container.h | 2 +- src/core/model/pair.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/model/attribute-container.h b/src/core/model/attribute-container.h index bb9c4bd22..7f59b53e3 100644 --- a/src/core/model/attribute-container.h +++ b/src/core/model/attribute-container.h @@ -68,7 +68,7 @@ public: // use underlying AttributeValue to get return element type /** Item type of container returned by Get. */ - typedef typename std::result_of::type item_type; + typedef typename std::invoke_result_t item_type; /** Type of container returned. */ typedef C result_type; diff --git a/src/core/model/pair.h b/src/core/model/pair.h index 36e60de8f..465b2706a 100644 --- a/src/core/model/pair.h +++ b/src/core/model/pair.h @@ -58,9 +58,9 @@ public: /** Type of value stored in the PairValue. */ typedef std::pair, Ptr > value_type; /** Type of abscissa (first entry of pair). */ - typedef typename std::result_of::type first_type; + typedef typename std::invoke_result_t first_type; /** Type of ordinal (second entry of pair). */ - typedef typename std::result_of::type second_type; + typedef typename std::invoke_result_t second_type; /** Type returned by Get or passed in Set. */ typedef typename std::pair result_type;