News for hackers. Stuff that matters.
Re:C++11 and Boost - Succinct like Python by bcoates on Wednesday October 31, 2012 @06:33PM (#4725243)
You can't do it with that syntax. 'auto' never infers constructor calls, just takes the static type of an LHS to capture a temporary into. You'd have to use a non-constructor template function that inspects the type of its argument to guess what kind of map you want.

  const auto TagDataMap = map_initializer( { "foo", { 1, 20, func }, ... } );
where map_initializer would be a template function that inspects the typedefs of its std::initializer_list<T> argument and generates an appropriate map.

In real C++ code, this would almost never be what you actually want, though, as the types in an initializer list in C++ do not imply the types being initialized, they are parameters to a constructor to be determined elsewhere.

Re:C++11 and Boost - Succinct like Python by fusiongyro on Wednesday October 31, 2012 @06:46PM (#4725277)
Thanks for clearing that up. I'm just starting to play with C++11 and have some trouble getting to a supporting compiler from work.