Summary:
If we're going to have a constructor for it, we should have operator=.
Otherwise, gcc-4.9 goes via the copy constructor effectively "ignoring" the attempted nesting for e.g..
```
d = { other_dynamic }; // Should be ARRAY containing dynamic
```
NOTE: this only fixes gcc-4.9, there's still issues in clang.
Reviewed By: yfeldblum
Differential Revision:
D2745180
fb-gh-sync-id:
667787c788fc7c131d8a34c608c355f5b875be50
new (&u_.string) fbstring(std::move(s));
}
+inline dynamic& dynamic::operator=(std::initializer_list<dynamic> il) {
+ (*this) = dynamic(il);
+ return *this;
+}
+
inline dynamic::dynamic(std::initializer_list<dynamic> il)
: type_(ARRAY)
{
* dynamic v = { 1, 2, 3, "foo" };
*/
/* implicit */ dynamic(std::initializer_list<dynamic> il);
+ dynamic& operator=(std::initializer_list<dynamic> il);
/*
* Conversion constructors from most of the other types.