From 8704dd0f7f32e2ebf9ca26d8c93f1d41d51b904a Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 19 Apr 2016 19:00:23 +0200 Subject: Windows fix. --- libevmasm/SourceLocation.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'libevmasm/SourceLocation.h') diff --git a/libevmasm/SourceLocation.h b/libevmasm/SourceLocation.h index 54f86450..8e22a826 100644 --- a/libevmasm/SourceLocation.h +++ b/libevmasm/SourceLocation.h @@ -26,6 +26,7 @@ #include #include #include +#include // defines noexcept macro for MSVC namespace dev { @@ -39,10 +40,20 @@ struct SourceLocation SourceLocation(): start(-1), end(-1) { } SourceLocation(int _start, int _end, std::shared_ptr _sourceName): start(_start), end(_end), sourceName(_sourceName) { } - SourceLocation(SourceLocation&&) = default; + SourceLocation(SourceLocation&& _other) noexcept: + start(_other.start), + end(_other.end), + sourceName(std::move(_other.sourceName)) + {} SourceLocation(SourceLocation const& _other) = default; SourceLocation& operator=(SourceLocation const&) = default; - SourceLocation& operator=(SourceLocation&&) = default; + SourceLocation& operator=(SourceLocation&& _other) noexcept + { + start = _other.start; + end = _other.end; + sourceName = std::move(_other.sourceName); + return *this; + } bool operator==(SourceLocation const& _other) const { return start == _other.start && end == _other.end;} bool operator!=(SourceLocation const& _other) const { return !operator==(_other); } -- cgit