25#ifndef SVNXX_DETAIL_FUTURE_HPP
26#define SVNXX_DETAIL_FUTURE_HPP
39using shared_ptr = std::shared_ptr<result>;
40using unique_ptr = std::unique_ptr<result>;
44class shared_future_base
47 shared_future_base()
noexcept {}
49 shared_future_base(
const shared_future_base& that)
50 : shared_result(that.shared_result)
53 shared_future_base(shared_future_base&& that)
54 : shared_result(std::move(that.shared_result))
57 explicit shared_future_base(shared_ptr shared_result_)
58 : shared_result(shared_result_)
62 shared_ptr shared_result;
66template<
typename T>
class future;
74class shared_future :
private std::shared_future<T>,
75 private shared_future_base
78 using inherited = std::shared_future<T>;
80 shared_future(inherited&& that, shared_ptr shared_result_) noexcept
81 : inherited(that), shared_future_base(shared_result_)
85 shared_future()
noexcept {}
87 shared_future(
const shared_future& that) noexcept
88 : inherited(that), shared_future_base(that)
91 shared_future(shared_future&& that) noexcept
92 : inherited(std::move(that)), shared_future_base(std::move(that))
98 using inherited::valid;
99 using inherited::wait;
100 using inherited::wait_for;
101 using inherited::wait_until;
109 future_base()
noexcept;
110 ~future_base()
noexcept;
111 future_base(future_base&& that)
noexcept;
112 future_base(
const future_base&) =
delete;
113 explicit future_base(unique_ptr&& unique_result_)
noexcept;
115 shared_ptr share()
noexcept;
118 unique_ptr unique_result;
127class future :
private std::future<T>,
134 using inherited = std::future<T>;
136 future(inherited&& that, unique_ptr&& unique_result_) noexcept
137 : inherited(std::move(that)), future_base(std::move(unique_result_))
143 future(future&& that) noexcept
144 : inherited(std::move(that)), future_base(std::move(that))
152 using inherited::get;
153 using inherited::valid;
154 using inherited::wait;
155 using inherited::wait_for;
156 using inherited::wait_until;
161inline shared_future<T>::shared_future(
future<T>&& that) noexcept
167template<
typename T>
using future = future_::future<T>;
168template<
typename T>
using shared_future = future_::shared_future<T>;
like std::future, but also maintains internal state relevant to the asynchronous SVN++ operation.
like std::shared_future, but also maintains internal state relevant to the asynchronous SVN++ operati...