-/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2015-2018. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#ifndef XBT_FUNCTIONAL_HPP
#define XBT_FUNCTIONAL_HPP
+#include <xbt/sysdep.h>
+#include <xbt/utility.hpp>
+
#include <cstddef>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <vector>
-#include "xbt/sysdep.h"
-#include "xbt/utility.hpp"
-
namespace simgrid {
namespace xbt {
if (that.vtable_ && that.vtable_->move)
that.vtable_->move(buffer_, that.buffer_);
else
- std::memcpy(&buffer_, &that.buffer_, sizeof(buffer_));
+ std::memcpy(static_cast<void*>(&buffer_), static_cast<void*>(&that.buffer_), sizeof(buffer_));
+
vtable_ = that.vtable_;
that.vtable_ = nullptr;
}
if (that.vtable_ && that.vtable_->move)
that.vtable_->move(buffer_, that.buffer_);
else
- std::memcpy(&buffer_, &that.buffer_, sizeof(buffer_));
+ std::memcpy(static_cast<void*>(&buffer_), static_cast<void*>(&that.buffer_), sizeof(buffer_));
vtable_ = that.vtable_;
that.vtable_ = nullptr;
return *this;