I’ve been following a few different news sources lately and have found a few good articles and projects I thought I would share.
I’ve been following a few different news sources lately and have found a few good articles and projects I thought I would share.
We’ve already covered C++11 decltype and why you should start using C++11 features today. Now we will move on to one of the most widely supported C++11 features: the new auto
keyword.; auto
is supported currently by g++ as of 4.4, clang and msvc since 10. So you are safe using it today if you don’t need to support any older compilers. The auto
keyword is used to let the compiler determine the type of a variable. This seemingly simple concept can really help clean up your code in some situations. For example:
Recently, while watching the GoingNative conference, I learned about the new std::shared_ptr
helper function std::make_shared
.
I like to connect to Virtual Box guest operating systems remotely over RDP connections. This generally works well except if I connect from my 1280x720 laptop to a Windows guest. In this case the Windows guest will tend to resize to a “standard” resolution that fits inside of the 1280x720, which is 800x600.
Quick, which language is the following code written in?
Every major platform and compiler now supports some aspect of the new C++ standard accepted in 2011. This means it is currently possible to write code that uses some of C++11 while maintaining cross-platform compatibility. Why should you care?
Neither C++ Coding Standards nor Effective C++ addresses the question of which float point type is best to use and in what situations. There are three floating point types in C and C++:
decltype
is a type specifier introduced in C++11. It behaves like a function that evaluates to the type of an object at compile time. This article is helping provide some more background information necessary for the more meatier C++11 articles to come.
In this article we are going to introduce the concept of C++ Template Partial Specialization. This is meant to be just a primer on the topic and not exhaustive. The examples here will be used and referenced in later articles. A series of discussions about C++11, now that the language has been finalized, will be coming shortly. In C++ a template class such as this: