mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
gdbsupport: Replace gdb::invoke_result with std::invoke_result
Given that GDB now requires C++17, we can replace gdb::invoke_result with std::invoke_result which is provided by <type_traits>. This patch also removes gdbsupport/invoke-result.h as it is not used anymore. Change-Id: I7e567356d38d6b3d85d8797d61cfc83f6f933f22 Approved-By: Tom Tromey <tom@tromey.com> Approved-By: Pedro Alves <pedro@palves.net>
This commit is contained in:
@@ -192,7 +192,7 @@
|
||||
You can find unit tests covering the whole API in
|
||||
unittests/function-view-selftests.c. */
|
||||
|
||||
#include "invoke-result.h"
|
||||
#include <type_traits>
|
||||
namespace gdb {
|
||||
|
||||
namespace fv_detail {
|
||||
@@ -230,7 +230,7 @@ class function_view<Res (Args...)>
|
||||
/* True if Func can be called with Args, and either the result is
|
||||
Res, convertible to Res or Res is void. */
|
||||
template<typename Callable,
|
||||
typename Res2 = typename gdb::invoke_result<Callable &, Args...>::type>
|
||||
typename Res2 = typename std::invoke_result<Callable &, Args...>::type>
|
||||
struct IsCompatibleCallable : CompatibleReturnType<Res2, Res>
|
||||
{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user