Add default constructor to dynamic, make other constructors simpler and stricter
Summary:
Now that the initializer list syntax has been removed we can add a default constructor.
Also,
- The `dynamic(T)` constructor was unconstrained, so it would match any type but then fail to compile (as a side effect, `is_convertible<T, dynamic>` would be always true). This also leaked the implementation details of `Array` and `Object`, as they were accepted as arguments. The diff makes the constructor accept only integral and float arguments, and all other types are SFINAEd out.
- `dynamic(Iterator, Iterator)` is made `explicit` to avoid accepting statements like `dynamic d = {"a", "b"};`.
- `object(...)` methods are simplified.
Reviewed By: luciang
Differential Revision:
D4065021
fbshipit-source-id:
ac289da7bece67c674b7036b7b51d5e016b297e5