copyable_atomic: add a ctor with initial value

This commit is contained in:
moneromooo-monero 2017-09-19 15:58:19 +01:00
parent 5f7cddeb53
commit 5fa199c652
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,8 @@ namespace epee
public:
copyable_atomic()
{};
copyable_atomic(uint32_t value)
{ store(value); }
copyable_atomic(const copyable_atomic& a):std::atomic<uint32_t>(a.load())
{}
copyable_atomic& operator= (const copyable_atomic& a)