folly::dynamic::operator= for std::initializer_list
authorLouis Brandy <ldbrandy@fb.com>
Fri, 11 Dec 2015 17:21:43 +0000 (09:21 -0800)
committerfacebook-github-bot-1 <folly-bot@fb.com>
Fri, 11 Dec 2015 18:20:23 +0000 (10:20 -0800)
commit34de70e251592fd4da73ffb8f908ba4e728f385c
tree2cb772b29b6d916ce70e901b8d7402b062dd9149
parentbf8a9074c904fd95d9b6e37e27e6dce7ecf17699
folly::dynamic::operator= for std::initializer_list

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
folly/dynamic-inl.h
folly/dynamic.h