: std::runtime_error(std::move(message)), throwpoint_(std::move(throwpoint))
{
}
+ Exception(const Exception&) = default;
+ Exception(Exception&&) noexcept = default;
~Exception(); // DO NOT define it here -- see Exception.cpp for a rationale
/** Return the information about where the exception was thrown */
: Exception(std::move(throwpoint), std::move(message))
{
}
+ TimeoutException(const TimeoutException&) = default;
+ TimeoutException(TimeoutException&&) noexcept = default;
};
XBT_ATTRIB_DEPRECATED_v328("Please use simgrid::TimeoutException") typedef TimeoutException TimeoutError;
: Exception(std::move(throwpoint), std::move(message))
{
}
+ HostFailureException(const HostFailureException&) = default;
+ HostFailureException(HostFailureException&&) noexcept = default;
};
/** Exception raised when a communication fails because of the network or because of the remote host */
: Exception(std::move(throwpoint), std::move(message))
{
}
+ NetworkFailureException(const NetworkFailureException&) = default;
+ NetworkFailureException(NetworkFailureException&&) noexcept = default;
};
/** Exception raised when a storage fails */
: Exception(std::move(throwpoint), std::move(message))
{
}
+ StorageFailureException(const StorageFailureException&) = default;
+ StorageFailureException(StorageFailureException&&) noexcept = default;
};
/** Exception raised when a VM fails */
: Exception(std::move(throwpoint), std::move(message))
{
}
+ VmFailureException(const VmFailureException&) = default;
+ VmFailureException(VmFailureException&&) noexcept = default;
};
/** Exception raised when something got canceled before completion */
: Exception(std::move(throwpoint), std::move(message))
{
}
+ CancelException(const CancelException&) = default;
+ CancelException(CancelException&&) noexcept = default;
};
/** Exception raised when something is going wrong during the simulation tracing */
: Exception(std::move(throwpoint), std::move(message))
{
}
+ TracingError(const TracingError&) = default;
+ TracingError(TracingError&&) noexcept = default;
};
/** Exception raised when something is going wrong during the parsing of XML files */
: Exception(XBT_THROW_POINT, xbt::string_printf("Parse error at %s:%d: %s", file.c_str(), line, msg.c_str()))
{
}
+ ParseError(const ParseError&) = default;
+ ParseError(ParseError&&) noexcept = default;
};
class XBT_PUBLIC ForcefulKillException {
// Move type:
Future(Future&) = delete;
- Future& operator=(Future&) = delete;
- Future(Future&& that) : state_(std::move(that.state_)) {}
- Future& operator=(Future&& that)
- {
- state_ = std::move(that.state_);
- return *this;
- }
+ Future& operator=(const Future&) = delete;
+ Future(Future&&) noexcept = default;
+ Future& operator=(Future&&) noexcept = default;
/** Whether the future is valid:.
*
// Move type
Promise(Promise const&) = delete;
Promise& operator=(Promise const&) = delete;
- Promise(Promise&& that) : state_(std::move(that.state_)) { std::swap(future_get_, that.future_get_); }
+ Promise(Promise&& that) noexcept : state_(std::move(that.state_)) { std::swap(future_get_, that.future_get_); }
- Promise& operator=(Promise&& that)
+ Promise& operator=(Promise&& that) noexcept
{
this->state_ = std::move(that.state_);
this->future_get_ = that.future_get_;
// Move type
Promise(Promise const&) = delete;
Promise& operator=(Promise const&) = delete;
- Promise(Promise&& that) : state_(std::move(that.state_)) { std::swap(future_get_, that.future_get_); }
- Promise& operator=(Promise&& that)
+ Promise(Promise&& that) noexcept : state_(std::move(that.state_)) { std::swap(future_get_, that.future_get_); }
+ Promise& operator=(Promise&& that) noexcept
{
this->state_ = std::move(that.state_);
this->future_get_ = that.future_get_;
public:
Future() { /* Nothing to do*/}
explicit Future(simgrid::kernel::Future<T> future) : future_(std::move(future)) {}
+ Future(Future&&) noexcept = default;
+ Future& operator=(Future&&) noexcept = default;
bool valid() const { return future_.valid(); }
T get()
Task(Task const&) = delete;
- Task(Task&& that)
+ Task(Task&& that) noexcept
{
if (that.vtable_ && that.vtable_->move)
that.vtable_->move(buffer_, that.buffer_);
that.vtable_ = nullptr;
}
Task& operator=(Task const& that) = delete;
- Task& operator=(Task&& that)
+ Task& operator=(Task&& that) noexcept
{
this->clear();
if (that.vtable_ && that.vtable_->move)
string() : string(&NUL, 0) {}
explicit string(const char* s) : string(s, strlen(s)) {}
string(string const& s) : string(s.c_str(), s.size()) {}
- string(string&& s) : str(std::move(s.str))
+ string(string&& s) noexcept : str(std::move(s.str))
{
s.str.len = 0;
s.str.data = &NUL;
for (std::size_t const& pageno : pagenos_)
store_->ref_page(pageno);
}
- ChunkedData(ChunkedData&& that) : pagenos_(std::move(that.pagenos_))
+ ChunkedData(ChunkedData&& that) noexcept : pagenos_(std::move(that.pagenos_))
{
std::swap(store_, that.store_);
that.pagenos_.clear();
}
return *this;
}
- ChunkedData& operator=(ChunkedData&& that)
+ ChunkedData& operator=(ChunkedData&& that) noexcept
{
this->clear();
store_ = that.store_;