How to get confused by VC++
Today, I came across a confusing compilation error with MS VC++ using a std::unique_ptr with a custom deleter. Here the code snippet:
CategoriesDevelopment
Tagsc++/c++0x/c++11/vc++/visual studio
Writing
Every post tagged c++. Newest first, unless you prefer archaeology.
Tagged posts
Today, I came across a confusing compilation error with MS VC++ using a std::unique_ptr with a custom deleter. Here the code snippet:
CategoriesDevelopment
Tagsc++/c++0x/c++11/vc++/visual studio
I was evaluating boost::serialization today. Based on the design goals mentioned in the library’s introduction, I felt like boost::serialization would suit my needs. An interesting point is this : 8. Orthogonal specification of class serialization and archive format. That is, any file format should be able to store serialization of any arbitrary set of C++
CategoriesDevelopment
Probably the best feature introduced by C++11 is std::unique_ptr. It will automagically make sure your dynamically allocated objects are deleted when you don’t use them anymore. In previous versions of C++, you needed to rely exclusively on documentation and conventions to ensure dynamically allocated memory was handled properly. With C++11, you can ask the compiler
CategoriesDevelopment
Tagsc++/c++0x/c++11/unique_ptr