I cannot understand when and how to use the new uniform initialization syntax in C++11. For example, I get 开发者_如何学Gothis:
I have played a lot the new Uniform Initialization with {}. Like this: vector<int> x = {1,2,3,4};
Like many, I am pretty excited about C++0x. I try to learn and use the new features in new projects so I can write the best, most easy-to-maintain code possible.
I am currently trying to understand the new uniform initialization of C++0x. Unfortunately, I stumpled over using uniform initialization of references. Example:
Is there a drawback to using the latter? Is std::make_pair more v开发者_StackOverflow中文版ersatile/compatible or are they truly interchangeable?
I\'ve tried using nested sets, and they become very difficult to maintain when dealing with multiple trees and lots of other complications.. I\'d like to give PHP\'s SPL library a stab at this (btw, w