Skip to content

Commit

Permalink
fair_queue: Mark entry constructor explicit
Browse files Browse the repository at this point in the history
Otherwise calling methods that accept f.q._entry passing there an
integer (and capacity_t is an integer) would compile with the help of
implicit temporary entry, which is very confusing.

Signed-off-by: Pavel Emelyanov <[email protected]>
  • Loading branch information
xemul committed Jan 20, 2025
1 parent e9c9cc3 commit 83e18eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/seastar/core/fair_queue.hh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private:
bi::slist_member_hook<> _hook;

public:
fair_queue_entry(capacity_t c) noexcept
explicit fair_queue_entry(capacity_t c) noexcept
: _capacity(c) {}
using container_list_t = bi::slist<fair_queue_entry,
bi::constant_time_size<false>,
Expand Down

0 comments on commit 83e18eb

Please sign in to comment.