Improved syntax checking for C++