File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments