A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unneeded extern "C".
[simgrid.git]
/
include
/
simgrid
/
kernel
/
future.hpp
diff --git
a/include/simgrid/kernel/future.hpp
b/include/simgrid/kernel/future.hpp
index
a4db6ec
..
f0c8cac
100644
(file)
--- a/
include/simgrid/kernel/future.hpp
+++ b/
include/simgrid/kernel/future.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2016-201
7
. The SimGrid Team.
+/* Copyright (c) 2016-201
8
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-48,7
+48,7
@@
public:
FutureStateBase(FutureStateBase const&) = delete;
FutureStateBase& operator=(FutureStateBase const&) = delete;
FutureStateBase(FutureStateBase const&) = delete;
FutureStateBase& operator=(FutureStateBase const&) = delete;
- XBT_PUBLIC
(void)
schedule(simgrid::xbt::Task<void()>&& job);
+ XBT_PUBLIC
void
schedule(simgrid::xbt::Task<void()>&& job);
void set_exception(std::exception_ptr exception)
{
void set_exception(std::exception_ptr exception)
{
@@
-209,7
+209,7
@@
void bindPromise(Promise<T> promise, Future<T> future)
{
class PromiseBinder {
public:
{
class PromiseBinder {
public:
- PromiseBinder(Promise<T> promise) : promise_(std::move(promise)) {}
+
explicit
PromiseBinder(Promise<T> promise) : promise_(std::move(promise)) {}
void operator()(Future<T> future)
{
simgrid::xbt::setPromise(promise_, future);
void operator()(Future<T> future)
{
simgrid::xbt::setPromise(promise_, future);
@@
-282,7
+282,7
@@
template<class T>
class Future {
public:
Future() = default;
class Future {
public:
Future() = default;
- Future(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
+
explicit
Future(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
// Move type:
Future(Future&) = delete;
// Move type:
Future(Future&) = delete;
@@
-455,7
+455,7
@@
template<class T>
class Promise {
public:
Promise() : state_(std::make_shared<FutureState<T>>()) {}
class Promise {
public:
Promise() : state_(std::make_shared<FutureState<T>>()) {}
- Promise(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
+
explicit
Promise(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
// Move type
Promise(Promise const&) = delete;
// Move type
Promise(Promise const&) = delete;
@@
-510,7
+510,7
@@
template<>
class Promise<void> {
public:
Promise() : state_(std::make_shared<FutureState<void>>()) {}
class Promise<void> {
public:
Promise() : state_(std::make_shared<FutureState<void>>()) {}
- Promise(std::shared_ptr<FutureState<void>> state) : state_(std::move(state)) {}
+
explicit
Promise(std::shared_ptr<FutureState<void>> state) : state_(std::move(state)) {}
~Promise()
{
if (state_ && state_->get_status() == FutureStatus::not_ready)
~Promise()
{
if (state_ && state_->get_status() == FutureStatus::not_ready)