mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
test: CScriptCheck is used a lot in std::vector, make sure that's efficient
Adds a few static_asserts so CScriptCheck stays is_nothrow_move_assignable, is_nothrow_move_constructible, and is_nothrow_destructible
This commit is contained in:
parent
81f67977f5
commit
fffc86f49f
1 changed files with 6 additions and 0 deletions
|
@ -42,6 +42,7 @@
|
|||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
|
@ -331,6 +332,11 @@ public:
|
|||
ScriptError GetScriptError() const { return error; }
|
||||
};
|
||||
|
||||
// CScriptCheck is used a lot in std::vector, make sure that's efficient
|
||||
static_assert(std::is_nothrow_move_assignable_v<CScriptCheck>);
|
||||
static_assert(std::is_nothrow_move_constructible_v<CScriptCheck>);
|
||||
static_assert(std::is_nothrow_destructible_v<CScriptCheck>);
|
||||
|
||||
/** Initializes the script-execution cache */
|
||||
[[nodiscard]] bool InitScriptExecutionCache(size_t max_size_bytes);
|
||||
|
||||
|
|
Loading…
Reference in a new issue