Skip to content

Commit c1cc5b1

Browse files
authored
Merge branch 'root' into feat/sources
2 parents c0bb63a + 5b11795 commit c1cc5b1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

inc/generator.hpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,33 @@ template <typename T, enabler<T> = true> class generator {
251251
* \param[in] p The promise to use.
252252
*/
253253
generator(promise_type &p) : _h{handle_type::from_promise(p)} {}
254+
255+
/**
256+
* \brief Copy-constructing generators results in undefined behaviour.
257+
*/
258+
generator(const generator &other) = delete;
259+
/**
260+
* \brief Moves the data from the other generator into this one.
261+
* \param[in,out] other The other generator.
262+
*/
263+
generator(generator &&other) = default;
264+
265+
/**
266+
* \brief Copy-assigning generators results in undefined behaviour.
267+
*/
268+
generator &operator=(const generator &other) = delete;
269+
/**
270+
* \brief Moves the data from the other generator into this one.
271+
* \param[in,out] other The other generator.
272+
* \returns A reference to this generator.
273+
*/
274+
generator &operator=(generator &&other) = default;
275+
276+
/**
277+
* \brief Cleans up this generator's resources.
278+
*/
279+
~generator() = default;
280+
254281
/**
255282
* \brief Converts this generator its handle.
256283
* \returns The handle for this generator.

0 commit comments

Comments
 (0)