Implicit construct sorted_vector_set from std::initializer_list
Summary:
The following thrift file doesn't work:
typedef set<i32> (cpp.template = "folly::sorted_vector_set") IntSet
struct Test {
1: map<i32, IntSet> m = {7: [1, 2]},
}
The generated file looks like this:
Test()
: m(std::initializer_list<
std::pair<const int32_t, folly::sorted_vector_set<int32_t>>>{
{7, std::initializer_list<int32_t>{1, 2}}}) {}
Given that `std::set` allows implicit construction from `std::initializer_list`, it's probably okay to make `folly::sorted_vector_set` the same.
Reviewed By: ot
Differential Revision:
D3968054
fbshipit-source-id:
978d59a7e545e44d603eeb9671815ac7f2c57342