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 <ameyanrd@outlook.com>
This commit is contained in:
committed by
Tom Henderson
parent
0001916d89
commit
fcc095b05c
@@ -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<decltype(&A::Get)(A)>::type item_type;
|
||||
typedef typename std::invoke_result_t<decltype(&A::Get), A> item_type;
|
||||
/** Type of container returned. */
|
||||
typedef C<item_type> result_type;
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@ public:
|
||||
/** Type of value stored in the PairValue. */
|
||||
typedef std::pair<Ptr<A>, Ptr<B> > value_type;
|
||||
/** Type of abscissa (first entry of pair). */
|
||||
typedef typename std::result_of<decltype(&A::Get)(A)>::type first_type;
|
||||
typedef typename std::invoke_result_t<decltype(&A::Get), A> first_type;
|
||||
/** Type of ordinal (second entry of pair). */
|
||||
typedef typename std::result_of<decltype(&B::Get)(B)>::type second_type;
|
||||
typedef typename std::invoke_result_t<decltype(&B::Get), B> second_type;
|
||||
/** Type returned by Get or passed in Set. */
|
||||
typedef typename std::pair<first_type, second_type> result_type;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user