Top "Uniform-initialization" questions

A C++11 feature which allows braces to be used to initialize any type of variable in any context

std::make_pair vs C++11 uniform initializer

Is there a drawback to using the latter? Is std::make_pair more versatile/compatible or are they truly interchangeable? …

c++ c++11 uniform-initialization
How to initialise a vector member variable in the class definition?

The following code compiles OK using XCode 5.0 but not Visual Studio 2013. #include <vector> class VectorInit { private: std::vector&…

c++ c++11 xcode5 visual-studio-2013 uniform-initialization
Could not convert from brace-enclosed initializer list to std tuple

As part of a bigger project, I'm playing with std::tuple and templates; consider the following code: template <typename ...…

c++ variadic-templates c++17 initializer-list uniform-initialization
Why doesn't emplace_back() use uniform initialization?

The following code: #include <vector> struct S { int x, y; }; int main() { std::vector<S> v; …

c++ vector c++11 uniform-initialization
How to use C++11 uniform initialization syntax?

I cannot understand when and how to use the new uniform initialization syntax in C++11. For example, I get this: …

c++ c++11 uniform-initialization