Commit 578f7544 authored by Kenton Varda's avatar Kenton Varda

Don't delete default dynamic builder constructors, because this makes things…

Don't delete default dynamic builder constructors, because this makes things difficult for the Python wrappers.
parent 24d5567c
......@@ -444,9 +444,10 @@ TEST(DynamicApi, BuilderAssign) {
auto root = builder.initRoot<DynamicStruct>(Schema::from<TestAllTypes>());
// Declare upfront, assign later.
// Note that the Python implementation requires defaulted constructors. Do not delete them!
DynamicValue::Builder value;
DynamicStruct::Builder structValue = nullptr;
DynamicList::Builder listValue = nullptr;
DynamicStruct::Builder structValue;
DynamicList::Builder listValue;
value = root.get("structField");
structValue = value.as<DynamicStruct>();
......
......@@ -187,7 +187,7 @@ class DynamicObject::Builder: public kj::DisallowConstCopy {
public:
typedef DynamicObject Builds;
Builder() = delete;
Builder() = default;
inline Builder(decltype(nullptr)) {}
Builder(Builder&) = default;
Builder(Builder&&) = default;
......@@ -277,7 +277,7 @@ class DynamicStruct::Builder {
public:
typedef DynamicStruct Builds;
Builder() = delete;
Builder() = default;
inline Builder(decltype(nullptr)) {}
template <typename T, typename = kj::EnableIf<kind<FromBuilder<T>>() == Kind::STRUCT>>
......@@ -430,7 +430,7 @@ class DynamicList::Builder {
public:
typedef DynamicList Builds;
Builder() = delete;
Builder() = default;
inline Builder(decltype(nullptr)) {}
template <typename T, typename = kj::EnableIf<kind<FromBuilder<T>>() == Kind::LIST>>
......
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