C++ Team Blog

The latest in C++, Visual Studio, VS Code, and vcpkg from the MSFT C++ team

Latest posts

Jul 8, 2013
Post comments count 0
Post likes count 0

MFC support for MBCS deprecated in Visual Studio 2013

Pat Brenner MSFT

April 2017 update Regarding our work on migration to VC2015 last year, we decided to remove the warning about MBCS deprecation.We hear you and understand that too many "old and large" MFC projects depend on it and it is too costly for large projects to move to Unicode. For new or small existing projects we definitely recommend using Unicode, as it is better for modern platforms. The deprecation warning has been removed from MFC in VC2017 and we will continue to provide MBCS support in future releases. Eric Mittelette – VC++ Lib Team ======================================================================   Hel...

Jul 4, 2013
Post comments count 0
Post likes count 0

Optimizing C++ Code : Constant-Folding

Jim Hogg

If you have arrived in the middle of this blog series, you might want instead to begin at the beginning.This post examines Constant-Folding – one of the simplest optimizations performed by the VC++ compiler.  In this optimization, the compiler works out the result of an expression while it is compiling (at “compile-time”), and inserts the answer directly into the generated code.  This avoids the cost of performing those same calculations when the program runs (at “runtime”).Here is an example.  A tiny main function, stored in the file App.cpp:int main() { return 7 + 8;...

Jul 1, 2013
Post comments count 0
Post likes count 0

Improved exception reporting for C++ Windows Store Apps in Visual Studio 2013

Cagri Aslan

Windows 8.1 and Visual Studio 2013 come with improvements for exception reporting in the platform and the debugger which will make it easier for native Windows Store App developers to diagnose errors in their applications. In this post, I’ll discuss a few of those improvements that are available in Visual Studio 2013 and show the differences in the debugging experience between Visual Studio 2012 and Visual Studio 2013. The sample project that contains the code snippets in this post can be downloaded from here.   Captured Stacks for Windows Runtime Exceptions Windows 8.1 adds support for capturing s...

Jun 28, 2013
Post comments count 0
Post likes count 0

C++11/14 STL Features, Fixes, And Breaking Changes In VS 2013

Stephan T. Lavavej - MSFT

I'm Stephan T. Lavavej, and for the last six and a half years I've been working with Dinkumware to maintain the C++ Standard Library implementation in Visual C++.  It's been a while since my last VCBlog post, because getting our latest batch of changes ready to ship has kept me very busy, but now I have time to write up what we've done!   If you missed the announcement, you can download 2013 Preview right now!   Note: In this post, whenever I say "2013" without qualification, I mean "2013 Preview and RTM".  I will explicitly mention when things will appear between Preview and RTM. &nbs...

Jun 28, 2013
Post comments count 0
Post likes count 0

Using Visual Studio 2013 to write maintainable native visualizations (natvis)

Eric Feiveson

In Visual Studio 2012 we introduced the ability to create visualizations for native types using natvis files.  Visual Studio 2013 contains several improvements that make it easier to author visualizations for classes that internally make use of collections to store items.   In this blog post I’ll show an example scenario that we wanted to improve, show you what you have to do in VS2012 to achieve the desired results, and then show you how the natvis authoring gets easier with VS2013 by exploring some of our new enhancements. Example scenario Let’s consider the following source co...

Jun 27, 2013
Post comments count 0
Post likes count 0

Using the 2013 CPU Sampling Profiler to Understand C++ Compiler Optimizations

Visual CPP Team

If you’ve ever profiled an optimized build of a C++ application there is a good chance that you looked at the profiling report and saw some functions missing that you expected to be present so you had to assume that they had been inlined but couldn’t be certain. Likewise, if you’ve ever tried to improve your application’s performance using the Profile Guided Optimization (PGO) feature in Visual Studio, you were likely blind to whether your training data actually had the desired effect. To help with this, in Visual Studio 2013 we’ve done work to help you understand when the compiler ...

Jun 27, 2013
Post comments count 0
Post likes count 0

What’s New for Visual C++ Developers in VS2013 Preview

Eric Battalio

Since the newer Visual C++ content is not yet live on MSDN, I copied the key bits from the "What's New for Visual C++ Developers" and replicated it below. Note that this post may be removed after the MSDN content has been available for a few weeks.Thanks for your patience!Improved ISO C/C++ Standards SupportCompiler The default behavior when this option is not specified is the same as in Visual Studio 2012.C99 Libraries Standard Template Library  Visual C++ Library Enhancements C++ Application Performance Windows Store App Development Support Diagnostics Enhancements ...

Jun 26, 2013
Post comments count 0
Post likes count 0

Just My Code for C++ in VS 2013

Visual CPP Team

If you have experience debugging C# or Visual Basic code in Visual Studio, you are probably familiar with a debugging feature called Just My Code (JMC).  In Visual Studio 2013, we introduce Just My Code for C++.  In VS2013, the goal of this C++ JMC feature is to help the user focus on their code when viewing call stacks without getting lost in library code, Windows code, etc. User Experience When looking at a call stack, the debugger will collapse all consecutive frames of non-user code into an annotated frame labeled [External Code].  There is an exception to this, if the application is stopped...

Jun 26, 2013
Post comments count 1
Post likes count 0

Visual Studio 2013 Preview Now Available!

Eric Battalio

Soma announced availability of the Visual Studio 2013 Preview.The experience for Visual C++ developers was improved with enhancements in the following areas: ISO C/C++ standards, Visual C++ library, C++ application performance, Windows Store App development, diagnostics, 3-D graphics, the IDE and productivity.Here are the key links: We look forward to your feedback. Use the new Send-a-Smile option in the product to share general thoughts about your experience.Keep an eye on Channel 9!