Boost :: assign is as close as possible.
In particular, assign :: list_of probably looks like the behavior you are looking for.
// Examples from the documentation: const list<int> primes = list_of(2)(3)(5)(7)(11); const stack<string> names = list_of( "Mr. Foo" )( "Mr. Bar")( "Mrs. FooBar" ).to_adapter(); map<int,int> next = map_list_of(1,2)(2,3)(3,4)(4,5)(5,6);
source share