Allows copy and assignment of field trial parameters.
Bug: webrtc:9346
Change-Id: I7734fbe60f95e554a636946cadc1940a78419951
Reviewed-on: https://webrtc-review.googlesource.com/c/104020
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25031}
diff --git a/rtc_base/experiments/field_trial_parser.h b/rtc_base/experiments/field_trial_parser.h
index c743bb0..22a8889 100644
--- a/rtc_base/experiments/field_trial_parser.h
+++ b/rtc_base/experiments/field_trial_parser.h
@@ -37,6 +37,10 @@
virtual ~FieldTrialParameterInterface();
protected:
+ // Protected to allow implementations to provide assignment and copy.
+ FieldTrialParameterInterface(const FieldTrialParameterInterface&) = default;
+ FieldTrialParameterInterface& operator=(const FieldTrialParameterInterface&) =
+ default;
explicit FieldTrialParameterInterface(std::string key);
friend void ParseFieldTrial(
std::initializer_list<FieldTrialParameterInterface*> fields,
@@ -46,7 +50,7 @@
std::string Key() const;
private:
- const std::string key_;
+ std::string key_;
bool used_ = false;
};