mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 02:33:24 -03:00
doc: Clarify C++20 comments
This commit is contained in:
parent
d84f736ba1
commit
fa87f8feb7
3 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2009-2022 The Bitcoin Core developers
|
||||
// Copyright (c) 2009-present The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
@ -71,7 +71,7 @@ auto& FuzzTargets()
|
|||
|
||||
void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target, FuzzTargetOptions opts)
|
||||
{
|
||||
const auto it_ins{FuzzTargets().try_emplace(name, FuzzTarget /* temporary can be dropped in C++20 */ {std::move(target), std::move(opts)})};
|
||||
const auto it_ins{FuzzTargets().try_emplace(name, FuzzTarget /* temporary can be dropped after clang-16 */ {std::move(target), std::move(opts)})};
|
||||
Assert(it_ins.second);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2021 The Bitcoin Core developers
|
||||
// Copyright (c) 2021-present The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
|
@ -15,7 +15,7 @@ namespace util {
|
|||
//! https://en.cppreference.com/w/cpp/utility/variant/visit#Example
|
||||
template<class... Ts> struct Overloaded : Ts... { using Ts::operator()...; };
|
||||
|
||||
//! Explicit deduction guide (not needed as of C++20)
|
||||
//! Explicit deduction guide (not needed after clang-17)
|
||||
template<class... Ts> Overloaded(Ts...) -> Overloaded<Ts...>;
|
||||
} // namespace util
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#ifndef BITCOIN_UTIL_TYPES_H
|
||||
#define BITCOIN_UTIL_TYPES_H
|
||||
|
||||
// Not needed after C++23 (DR, https://cplusplus.github.io/CWG/issues/2518.html)
|
||||
template <class>
|
||||
inline constexpr bool ALWAYS_FALSE{false};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue