Skip to content

Commit 162a3ac

Browse files
committed
Fix: Default constructors should be noexcept
1 parent 5e45bf8 commit 162a3ac

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

include/fork_union.hpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ struct broadcast_join {
314314
}
315315

316316
~broadcast_join() noexcept { join(); }
317-
broadcast_join(broadcast_join &&) = default;
317+
broadcast_join(broadcast_join &&) noexcept = default;
318318
broadcast_join(broadcast_join const &) = delete;
319-
broadcast_join &operator=(broadcast_join &&) = default;
319+
broadcast_join &operator=(broadcast_join &&) noexcept = default;
320320
broadcast_join &operator=(broadcast_join const &) = delete;
321321
};
322322

@@ -332,11 +332,11 @@ struct prong {
332332
task_index_t task {0};
333333
thread_index_t thread {0};
334334

335-
constexpr prong() = default;
336-
constexpr prong(prong &&) = default;
337-
constexpr prong(prong const &) = default;
338-
constexpr prong &operator=(prong &&) = default;
339-
constexpr prong &operator=(prong const &) = default;
335+
constexpr prong() noexcept = default;
336+
constexpr prong(prong &&) noexcept = default;
337+
constexpr prong(prong const &) noexcept = default;
338+
constexpr prong &operator=(prong &&) noexcept = default;
339+
constexpr prong &operator=(prong const &) noexcept = default;
340340

341341
explicit prong(task_index_t task, thread_index_t thread) noexcept : task(task), thread(thread) {}
342342

@@ -359,11 +359,11 @@ struct colocated_prong {
359359
thread_index_t thread {0};
360360
colocation_index_t colocation {0};
361361

362-
constexpr colocated_prong() = default;
363-
constexpr colocated_prong(colocated_prong &&) = default;
364-
constexpr colocated_prong(colocated_prong const &) = default;
365-
constexpr colocated_prong &operator=(colocated_prong const &) = default;
366-
constexpr colocated_prong &operator=(colocated_prong &&) = default;
362+
constexpr colocated_prong() noexcept = default;
363+
constexpr colocated_prong(colocated_prong &&) noexcept = default;
364+
constexpr colocated_prong(colocated_prong const &) noexcept = default;
365+
constexpr colocated_prong &operator=(colocated_prong const &) noexcept = default;
366+
constexpr colocated_prong &operator=(colocated_prong &&) noexcept = default;
367367

368368
explicit colocated_prong(task_index_t task, thread_index_t thread, colocation_index_t colocation) noexcept
369369
: task(task), thread(thread), colocation(colocation) {}
@@ -389,11 +389,11 @@ struct colocated_thread {
389389
thread_index_t thread {0};
390390
colocation_index_t colocation {0};
391391

392-
constexpr colocated_thread() = default;
393-
constexpr colocated_thread(colocated_thread &&) = default;
394-
constexpr colocated_thread(colocated_thread const &) = default;
395-
constexpr colocated_thread &operator=(colocated_thread const &) = default;
396-
constexpr colocated_thread &operator=(colocated_thread &&) = default;
392+
constexpr colocated_thread() noexcept = default;
393+
constexpr colocated_thread(colocated_thread &&) noexcept = default;
394+
constexpr colocated_thread(colocated_thread const &) noexcept = default;
395+
constexpr colocated_thread &operator=(colocated_thread const &) noexcept = default;
396+
constexpr colocated_thread &operator=(colocated_thread &&) noexcept = default;
397397

398398
explicit colocated_thread(thread_index_t thread, colocation_index_t colocation) noexcept
399399
: thread(thread), colocation(colocation) {}
@@ -626,7 +626,7 @@ struct indexed_split {
626626
using index_t = index_type_;
627627
using indexed_range_t = indexed_range<index_t>;
628628

629-
inline indexed_split() = default;
629+
inline indexed_split() noexcept = default;
630630

631631
/**
632632
* @brief Constructs an indexed split for a given number of tasks and threads.
@@ -716,7 +716,7 @@ struct coprime_permutation_range {
716716
index_t elements_left_ {0}; // countdown until `end()`
717717
};
718718

719-
coprime_permutation_range() = default;
719+
coprime_permutation_range() noexcept = default;
720720

721721
/**
722722
* @param[in] start First element of the permutation.

0 commit comments

Comments
 (0)