mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Declare single-argument (non-converting) constructors "explicit"
In order to avoid unintended implicit conversions.
This commit is contained in:
@@ -17,7 +17,7 @@ class reverse_range
|
||||
T &m_x;
|
||||
|
||||
public:
|
||||
reverse_range(T &x) : m_x(x) {}
|
||||
explicit reverse_range(T &x) : m_x(x) {}
|
||||
|
||||
auto begin() const -> decltype(this->m_x.rbegin())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user