diff --git a/libs/common/include/launchdarkly/attributes_builder.hpp b/libs/common/include/launchdarkly/attributes_builder.hpp index e28021003..3c7765507 100644 --- a/libs/common/include/launchdarkly/attributes_builder.hpp +++ b/libs/common/include/launchdarkly/attributes_builder.hpp @@ -31,7 +31,7 @@ class AttributesBuilder final { * @param key The key for the kind. */ AttributesBuilder(BuilderReturn& builder, std::string kind, std::string key) - : key_(std::move(key)), kind_(std::move(kind)), builder_(builder) { + : builder_(builder), kind_(std::move(kind)), key_(std::move(key)) { } /** @@ -45,9 +45,9 @@ class AttributesBuilder final { AttributesBuilder(BuilderReturn& builder, std::string kind, Attributes const& attributes) - : key_(attributes.Key()), + : builder_(builder), kind_(std::move(kind)), - builder_(builder), + key_(attributes.Key()), name_(attributes.Name()), anonymous_(attributes.Anonymous()), private_attributes_(attributes.PrivateAttributes()) { diff --git a/libs/common/src/attributes_builder.cpp b/libs/common/src/attributes_builder.cpp index 3b74298e1..adb5aef73 100644 --- a/libs/common/src/attributes_builder.cpp +++ b/libs/common/src/attributes_builder.cpp @@ -3,6 +3,7 @@ #include #include +#include namespace launchdarkly { template <>