aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/safe-iterator.h
diff options
context:
space:
mode:
authorLancelot Six <lancelot.six@amd.com>2023-10-13 12:39:55 +0000
committerLancelot Six <lancelot.six@amd.com>2023-11-21 11:52:36 +0000
commit70d02be7e369e8763bf3238eb7c6ae7f9efb5429 (patch)
tree459590d351ef1d66cd99734dca5f80448eea3b47 /gdbsupport/safe-iterator.h
parent393be56421a81e44c8728c8b31df66b319697398 (diff)
downloadgdb-70d02be7e369e8763bf3238eb7c6ae7f9efb5429.zip
gdb-70d02be7e369e8763bf3238eb7c6ae7f9efb5429.tar.gz
gdb-70d02be7e369e8763bf3238eb7c6ae7f9efb5429.tar.bz2
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>
Diffstat (limited to 'gdbsupport/safe-iterator.h')
-rw-r--r--gdbsupport/safe-iterator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdbsupport/safe-iterator.h b/gdbsupport/safe-iterator.h
index ccd772c..b489132 100644
--- a/gdbsupport/safe-iterator.h
+++ b/gdbsupport/safe-iterator.h
@@ -19,7 +19,7 @@
#ifndef COMMON_SAFE_ITERATOR_H
#define COMMON_SAFE_ITERATOR_H
-#include "gdbsupport/invoke-result.h"
+#include <type_traits>
/* A forward iterator that wraps Iterator, such that when iterating
with iterator IT, it is possible to delete *IT without invalidating
@@ -77,7 +77,7 @@ public:
basic_safe_iterator ()
{}
- typename gdb::invoke_result<decltype(&Iterator::operator*), Iterator>::type
+ typename std::invoke_result<decltype(&Iterator::operator*), Iterator>::type
operator* () const
{ return *m_it; }