Skip to content

Tags: dymk/folly

Tags

deprecate-dynamic-initializer

Toggle deprecate-dynamic-initializer's commit message
Deprecate dynamic::dynamic(std::initializer_list<dynamic>)

Summary:After DR95 the single braces dispatch to the copy constructor
(http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1467),
so it is not possible anymore to initialize a singleton dynamic array
using the braces syntax. The initializer list constructor already had
a special case for empty lists, which unconditionally called the
default constructor if defined.

This diff deprecates the braces syntax and defines the following alternative:
```
dynamic empty = dynamic::array;
dynamic a = dynamic::array(1, 2, "foo");
```

Reviewed By: luciang, yfeldblum

Differential Revision: D3013423

fb-gh-sync-id: a0cf09dfd96e9806044f7c3bf3592c637a9bc932
shipit-source-id: a0cf09dfd96e9806044f7c3bf3592c637a9bc932

v0.57.0

Toggle v0.57.0's commit message
Bump version to 57:0

v0.56.0

Toggle v0.56.0's commit message
Bump version to 56:0

v0.55.0

Toggle v0.55.0's commit message
Bump version to 55:0

v0.54.0

Toggle v0.54.0's commit message
Bump version to 54:0

v0.53.0

Toggle v0.53.0's commit message
Bump version to 53:0

v0.52.0

Toggle v0.52.0's commit message
Bump version to 52:0

v0.51.0

Toggle v0.51.0's commit message
Bump version to 51:0

v0.50.0

Toggle v0.50.0's commit message
Bump version to 50:0

v0.49.1

Toggle v0.49.1's commit message
Bump version to 49:1