C++11 Certified!

Yes I am now C++11 Certified!

This week we got a nice C++11 course giving by the guys from develop.com, over-viewing all the nice features of C++11.

My three favorite features are:
– auto

auto element = map_of_something.begin()->second;

– template alias

template<typename T>
using VCNHashTable = std::unordered_map<std::string, T>;
// ...
VCNHashTable<VCNEffect*> mEffects;

– and range for (not in VC10, but in VC11)

for( auto effect : mEffects )
{
  effect->RenderMesh(...);
}

See http://herbsutter.com/elements-of-modern-c-style/ for more info.

But why in hell, did they not add more nice features to std::string (trim(), split(), multiple favors of replace(), etc)? They just had too take a look at QString, String in C#. Bah! All other languages and popular libraries has nice string classes, but we are still with a low feature string class.

This entry was posted in C++ and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *