From b3b14171766089890b9e1b44935ed5dbc233c5f8 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 13 Dec 2022 22:03:02 +0300 Subject: Add noexcept to move constructors and move assignment operators --- libbuild2/variable.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libbuild2/variable.cxx') diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx index fefea98..260d664 100644 --- a/libbuild2/variable.cxx +++ b/libbuild2/variable.cxx @@ -47,7 +47,7 @@ namespace build2 } value:: - value (value&& v) + value (value&& v) noexcept : type (v.type), null (v.null), extra (v.extra) { if (!null) @@ -99,6 +99,8 @@ namespace build2 if (null) new (&data_) names (move (v).as ()); else + // Note: can throw (see small_vector for details). + // as () = move (v).as (); } else if (auto f = null ? type->copy_ctor : type->copy_assign) -- cgit v1.1