C++ static_assert, a niche feature

The new C++ standard defines a new keyword, static_assert, that is already available in Visual Studio 2010 CTP. This new feature allows introducing compile time asserts. It takes an expression that can evaluate to bool and a string. If the expression evaluates to false, the compiler issues an error with the given string literal. If … Read more

Lambdas in C++

The new C++0x standard adds lambda expressions to the language. Visual Studio 2010 CTP is already supporting this new feature that brings functional techniques to C++ too. What is a lambda expression? It’s basically a function. In F# it’s an anonymous function, in C# it’s an anonymous delegate; in C++ it’s in fact an anonymous … Read more

Type inference in C++

The new C++0x standard provides support for type inference. The auto keyword that was doing nothing in C++ was given a new meaning: a placeholder for a type inferred by the compiler. For those familiar with C#’s var keyword, this is basically the same. Here is a comparison between auto in C++ and var in … Read more

VSBuildStatusAddin for Visual Studio 2005

I have modified my VSBuildStatus add-in to work with Visual Studio 2005. Basically I had to remove the LINQ stuff to break the dependency on the version 3.5 of the .NET framework. The new version (1.0.3) that supports Visual Studio 2005 is available here. Let me know if you have any problems with it. Especially … Read more

50917 errors

This is the record number of error I ever got in a project: 50917. After compiling that VC# project (with T4), Visual Studio 2008 was a little bit overwhelmed. It started to report out of memory errors and failed to build after fixing the error. A restart was, of course, the cure.

VSBuildStatusAddin for Visual Studio 2008

I have created an published at Visual Studio Gallery an add-in for Visual Studio 2008, called VSBuildStatusAddin. This add-in shows the status of a build/clean/deploy operation. I hope some of you will find this useful. Bellow is a description of the add-in. Installation Extract the content of the archive to your Visual Studio 2008 add-ins … Read more

Visual Studio Search Error

Sometimes, when searching in Visual Studio (all version since 2003 at least) you get this message: No files were found to look in. Find was stopped in progress. It cannot find any match for the search criteria, even if there are thousands. And it displays that message immediately after pressing Search. You can search again … Read more

Visual Studio 2010 & .NET 4.0 CTP released

Microsoft has recently released the first Community Technology preview for Visual Studio 2010 and .NET Framework 4.0. Here is a list of new things in VC++, from the VC++ team’s blog: MSBuild Support for Visual C++ IntelliSense and Browsing Experience Improved Responsiveness and Scale Improved Accuracy and Robustness C++0x Features Lambda Expressions Rvalue References static_assert … Read more