From 09512e613540ca1b8162030b6b4dd381c36e79eb Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Tue, 27 Jun 2023 14:03:16 +0200 Subject: ast: Add explicit default copy constructor Add explicit default copy/move constructor to identifiers. gcc/rust/ChangeLog: * ast/rust-ast.h: Add default constructors. Signed-off-by: Pierre-Emmanuel Patry --- gcc/rust/ast/rust-ast.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc') diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h index 98b0482..4eaa39d 100644 --- a/gcc/rust/ast/rust-ast.h +++ b/gcc/rust/ast/rust-ast.h @@ -39,6 +39,11 @@ public: : ident (ident), node_id (Analysis::Mappings::get ()->get_next_node_id ()) {} + Identifier (const Identifier &) = default; + Identifier (Identifier &&) = default; + Identifier &operator= (const Identifier &) = default; + Identifier &operator= (Identifier &&) = default; + NodeId get_node_id () const { return node_id; } const std::string &as_string () const { return ident; } -- cgit v1.1