Windows fix.

This commit is contained in:
chriseth
2016-04-21 16:13:39 +02:00
parent ed9da5171b
commit 8704dd0f7f
2 changed files with 14 additions and 3 deletions
+13 -2
View File
@@ -26,6 +26,7 @@
#include <string>
#include <ostream>
#include <tuple>
#include <libdevcore/Common.h> // 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<std::string const> _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); }