mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-13 22:24:05 +01:00
refactor: Allow CScript construction from any std::input_iterator
Also, remove the value_type alias, which is not needed when element_type is present.
This commit is contained in:
@@ -429,11 +429,11 @@ protected:
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
public:
|
||||
CScript() = default;
|
||||
CScript(const_iterator pbegin, const_iterator pend) : CScriptBase(pbegin, pend) { }
|
||||
CScript(std::vector<unsigned char>::const_iterator pbegin, std::vector<unsigned char>::const_iterator pend) : CScriptBase(pbegin, pend) { }
|
||||
CScript(const unsigned char* pbegin, const unsigned char* pend) : CScriptBase(pbegin, pend) { }
|
||||
template <std::input_iterator InputIterator>
|
||||
CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
|
||||
|
||||
SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user