Commit 2e2e7af8 authored by Igor Sugak's avatar Igor Sugak Committed by Facebook GitHub Bot

add copy assignment operator to BasicDynamicTokenBucket

Summary: `BasicDynamicTokenBucket` declares a copy constructor, but not copy assignment operator.

Differential Revision: D30258099

fbshipit-source-id: c993177e11023d13d01884e5060269c4d5813088
parent 559c679d
......@@ -275,13 +275,15 @@ class BasicDynamicTokenBucket {
: bucket_(zeroTime) {}
/**
* Copy constructor.
* Copy constructor and copy assignment operator.
*
* Thread-safe. (Copy constructors of derived classes may not be thread-safe
* however.)
*/
BasicDynamicTokenBucket(const BasicDynamicTokenBucket& other) noexcept
: bucket_(other.bucket_) {}
BasicDynamicTokenBucket(const BasicDynamicTokenBucket& other) noexcept =
default;
BasicDynamicTokenBucket& operator=(
const BasicDynamicTokenBucket& other) noexcept = default;
/**
* Re-initialize token bucket.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment