public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] util: Add copyright header on make-unique.h
@ 2022-06-08 12:43 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:43 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a6f5bc6054520f0dc8479215dc1204196ae7767f

commit a6f5bc6054520f0dc8479215dc1204196ae7767f
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date:   Thu May 5 14:19:59 2022 +0200

    util: Add copyright header on make-unique.h

Diff:
---
 gcc/rust/util/rust-make-unique.h | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/gcc/rust/util/rust-make-unique.h b/gcc/rust/util/rust-make-unique.h
index 5f098d20307..77b203ee1c9 100644
--- a/gcc/rust/util/rust-make-unique.h
+++ b/gcc/rust/util/rust-make-unique.h
@@ -1,13 +1,31 @@
+// Copyright (C) 2020-2022 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3.  If not see
+// <http://www.gnu.org/licenses/>.
+
 #ifndef RUST_MAKE_UNIQUE_H
 #define RUST_MAKE_UNIQUE_H
 
+#include <memory>
+
 namespace Rust {
 
 template <typename T, typename... Ts>
-std::unique_ptr<T>
-make_unique (Ts &&... params)
-{
-  return std::unique_ptr<T> (new T (std::forward<Ts> (params)...));
+std::unique_ptr<T> make_unique(Ts &&...params) {
+  return std::unique_ptr<T>(new T(std::forward<Ts>(params)...));
 }
 
 } // namespace Rust


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-08 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:43 [gcc/devel/rust/master] util: Add copyright header on make-unique.h Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).