maflcko
commented at 8:50 pm on December 10, 2024:
member
The return type of std::forward depends on the template type, and can not be recovered from the args. Attempting to do so will result in a compile failure. For example, make_secure_unique<std::string>(std::string{}); does not compile on current master, but does with this pull.
Another example would be make_secure_unique<std::pair<std::string, std::unique_ptr<int>>>(std::string{}, std::make_unique<int>(21));
DrahtBot
commented at 8:50 pm on December 10, 2024:
contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
DrahtBot added the label
Utils/log/libs
on Dec 10, 2024
maflcko added the label
Refactoring
on Dec 10, 2024
util: Add missing types in make_secure_uniquefa397177ac
maflcko force-pushed
on Dec 10, 2024
hodlinator approved
hodlinator
commented at 8:25 pm on December 16, 2024:
contributor
ACKfa397177acfa1006ea6feee0b215c53e51f284de
Accidentally tested make_secure_unique<std::string>(std::string{}) with std::forward<T> in the implementation (misremembering the change in this PR). It worked, so I came up with a better test case which requires std::forward<Args>:
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-01-20 09:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me