aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/gdb_unique_ptr.h
diff options
context:
space:
mode:
authorLancelot Six <lancelot.six@amd.com>2023-09-14 11:13:24 +0000
committerLancelot Six <lancelot.six@amd.com>2023-11-21 11:52:35 +0000
commit6b62451ad08056f0ba02e192ec34ef67c4294ef4 (patch)
tree761f6e5a19e9e16d87ec955929aecd025166e335 /gdbsupport/gdb_unique_ptr.h
parent1367eeec2cbd1bb14b89030e199d06fc676ffc49 (diff)
downloadgdb-6b62451ad08056f0ba02e192ec34ef67c4294ef4.zip
gdb-6b62451ad08056f0ba02e192ec34ef67c4294ef4.tar.gz
gdb-6b62451ad08056f0ba02e192ec34ef67c4294ef4.tar.bz2
gdb: Use C++17's std::make_unique instead of gdb::make_unique
gdb::make_unique is a wrapper around std::make_unique when compiled with C++17. Now that C++17 is required, use std::make_unique directly in the codebase, and remove gdb::make_unique. Change-Id: I80b615e46e4b7c097f09d78e579a9bdce00254ab Approved-By: Tom Tromey <tom@tromey.com> Approved-By: Pedro Alves <pedro@palves.net
Diffstat (limited to 'gdbsupport/gdb_unique_ptr.h')
-rw-r--r--gdbsupport/gdb_unique_ptr.h13
1 files changed, 0 insertions, 13 deletions
diff --git a/gdbsupport/gdb_unique_ptr.h b/gdbsupport/gdb_unique_ptr.h
index 2b6c0ce..3bef6ff 100644
--- a/gdbsupport/gdb_unique_ptr.h
+++ b/gdbsupport/gdb_unique_ptr.h
@@ -56,19 +56,6 @@ struct noop_deleter
void operator() (T *ptr) const { }
};
-/* Create simple std::unique_ptr<T> objects. */
-
-template<typename T, typename... Arg>
-std::unique_ptr<T>
-make_unique (Arg &&...args)
-{
-#if __cplusplus >= 201402L
- return std::make_unique<T> (std::forward<Arg> (args)...);
-#else
- return std::unique_ptr<T> (new T (std::forward<Arg> (args)...));
-#endif /* __cplusplus < 201402L */
-}
-
} /* namespace gdb */
/* Dup STR and return a unique_xmalloc_ptr for the result. */