Skip to content

Commit 7b254e2

Browse files
Made move constructor strong exception safe
1 parent d66c0bc commit 7b254e2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/util/symbol_table.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,8 @@ class symbol_tablet
7474

7575
symbol_tablet &operator=(const symbol_tablet &other)
7676
{
77-
internal_symbols=other.internal_symbols;
78-
internal_symbol_base_map=other.internal_symbol_base_map;
79-
internal_symbol_module_map=other.symbol_module_map;
80-
return *this;
77+
// Copy to temp and then call move assignment
78+
return *this=symbol_tablet(other);
8179
}
8280

8381
symbol_tablet(symbol_tablet &&other)

0 commit comments

Comments
 (0)