-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Declare single-argument (non-converting) constructors "explicit" #10969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c268d43
to
3bdbbce
Compare
Rebased! Feel free to review :-) |
Rebooted the failing test. |
Thanks! |
utACK 3bdbbce |
In order to avoid unintended implicit conversions.
3bdbbce
to
64fb0ac
Compare
Rebased! |
utACK 64fb0ac, this is a good precaution to avoid accidental "automatic conversions". |
laanwj
added a commit
that referenced
this pull request
Aug 18, 2017
…explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
maflcko
pushed a commit
that referenced
this pull request
Aug 25, 2017
…onstructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged #10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
sickpig
referenced
this pull request
in sickpig/BitcoinUnlimited
Jan 11, 2018
In order to avoid unintended implicit conversions. (partial port of core #10969)
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Sep 19, 2019
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Sep 19, 2019
…ument constructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged bitcoin#10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Sep 23, 2019
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Sep 23, 2019
…ument constructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged bitcoin#10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Sep 24, 2019
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Sep 24, 2019
…ument constructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged bitcoin#10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Nov 19, 2019
…ument constructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged bitcoin#10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Nov 21, 2019
…ument constructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged bitcoin#10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Dec 9, 2019
…ument constructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged bitcoin#10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Dec 22, 2019
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 1, 2020
…ument constructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged bitcoin#10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 2, 2020
…ument constructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged bitcoin#10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 2, 2020
…ument constructors "explicit" f1708ef Add recommendation: By default, declare single-argument constructors `explicit` (practicalswift) Pull request description: This is a follow-up to the now merged bitcoin#10969. Add recommendation: > By default, declare single-argument constructors `explicit`. > > - *Rationale*: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. > Tree-SHA512: 1ceb1008a7863ebd0f09ba9c06b4e28b3b03265d7381f9d0c8bd4be1663d5d0392de0ecd811027aa27c0d962723674b245b3c165a437942a776f3525db39d36b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 2, 2020
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 4, 2020
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 4, 2020
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 10, 2020
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 10, 2020
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 10, 2020
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 12, 2020
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
str4d
added a commit
to str4d/zcash
that referenced
this pull request
Jul 31, 2020
Cherry-picked from: - bitcoin/bitcoin#9233 - bitcoin/bitcoin#10483 - bitcoin/bitcoin#10645 - bitcoin/bitcoin#10969 - bitcoin/bitcoin#11351 Co-authored-by: fsb4000 <fsb4000@yandex.ru> Co-authored-by: practicalswift <practicalswift@users.noreply.github.com> Co-authored-by: Dan Raviv <dan@soundradix.com>
zkbot
added a commit
to zcash/zcash
that referenced
this pull request
Sep 29, 2020
Locked memory manager Add a pool for locked memory chunks, replacing `LockedPageManager`. Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#8321 - bitcoin/bitcoin#8753 - bitcoin/bitcoin#9063 - bitcoin/bitcoin#9070 - bitcoin/bitcoin#11385 - bitcoin/bitcoin#12048 - Excludes change to benchmark. - bitcoin/bitcoin#15117 - bitcoin/bitcoin#16161 - Excludes Travis CI changes. - Includes change from bitcoin/bitcoin#13163 - bitcoin/bitcoin#15600 - bitcoin/bitcoin#18443 - Assorted small changes from: - bitcoin/bitcoin#9233 - bitcoin/bitcoin#10483 - bitcoin/bitcoin#10645 - bitcoin/bitcoin#10969 - bitcoin/bitcoin#11351 - bitcoin/bitcoin#19111 - Excludes change to `src/rpc/server.cpp` - bitcoin/bitcoin#9804 - Only the commit for `src/key.cpp` - bitcoin/bitcoin#9598
gades
pushed a commit
to cosanta/cosanta-core
that referenced
this pull request
Jun 25, 2021
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
gades
pushed a commit
to cosanta/cosanta-core
that referenced
this pull request
Jun 30, 2021
…ctors "explicit" 64fb0ac Declare single-argument (non-converting) constructors "explicit" (practicalswift) Pull request description: Declare single-argument (non-converting) constructors `explicit`. In order to avoid unintended implicit conversions. For a more thorough discussion, see ["C.46: By default, declare single-argument constructors explicit"](http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c46-by-default-declare-single-argument-constructors-explicit) in the C++ Core Guidelines (Stroustrup & Sutter). Tree-SHA512: e0c6922e56b11fa402621a38656d8b1122d16dd8f160e78626385373cf184ac7f26cb4c1851eca47e9b0dbd5e924e39a85c3cbdcb627a05ee3a655ecf5f7a0f1
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Declare single-argument (non-converting) constructors
explicit
.In order to avoid unintended implicit conversions.
For a more thorough discussion, see "C.46: By default, declare single-argument constructors explicit" in the C++ Core Guidelines (Stroustrup & Sutter).