C++ Team Blog

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

Latest posts

Optimizing C++ Code : Dead Code Elimination
Aug 9, 2013
Post comments count 0
Post likes count 0

Optimizing C++ Code : Dead Code Elimination

Jim Hogg
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 the optimization called Dead-Code-Elimination, which I’ll abbreviate to DCE.  It does what it says: discards any calculations whose results are not actually used by the program.Now, you will probably assert that your code calculates only results that are used, and never any results that are not used: only an idiot, after all, would gratuitously add useless code – calculating the first 1000 digits of pi, for example, whilst also doing something useful.  So when woul...

C++ IDE Performance Improvement in Visual Studio 2013 Preview
Aug 5, 2013
Post comments count 0
Post likes count 0

C++ IDE Performance Improvement in Visual Studio 2013 Preview

Li Shao [MSFT]
Li Shao [MSFT]

My name is Li Shao. I am a Senior Software Design Engineer in Test on the VC++ team. In this blog, I would like to share the performance enhancements we've made in VS 2013 Preview to improve the C++ IDE and build system. Performance is a vital part of software quality. Over the last couple of releases we have made significant performance improvements in areas such as solution load, IntelliSense and code navigation. In VS 2013, we focused our performance effort on a few other key scenarios such as configuration switching, responsiveness and build throughput. We also improved the way we monitor real-world perfor...

New Features in C++/CX's <collection.h> for VS 2013 RTM
Jul 30, 2013
Post comments count 0
Post likes count 0

New Features in C++/CX's <collection.h> for VS 2013 RTM

Brandon Jacobs
Brandon Jacobs

Introduction: Hi, I’m Brandon Jacobs, an intern on the Visual C++ Libraries team. For part of my internship, I was tasked with adding new features to Stephan T. Lavavej’s <collection.h>. It was certainly an honor to be one of the few to contribute to <collection.h>. You can find these changes in VS 2013 RTM (these changes are not in 2013 Preview).  Summary: These are the changes I’ve made to <collection.h>:1.            Added UnorderedMap and UnorderedMapView wrapper classes to <collection.h>.2.  ...

C99 library support in Visual Studio 2013
Jul 19, 2013
Post comments count 0
Post likes count 0

C99 library support in Visual Studio 2013

Pat Brenner MSFT
Pat Brenner MSFT

Hello, I’m Pat Brenner, a developer on the Visual C++ Libraries team. In this blog post I want to share some information about the C99 support added to the C run-time library in Visual Studio 2013.To summarize, we added declarations and implementations for missing functions in the following headers: math.h, ctype.h, wctype.h, stdio.h, stdlib.h, and wchar.h. We also added the new headers complex.h, stdbool.h, fenv.h, and inttypes.h, and added the implementations for all the functions declared in them. In addition, we added the new C++ wrapper headers (ccomplex, cfenv, cinttypes, ctgmath) and updated a number...

Introducing ‘Vector Calling Convention’
Jul 11, 2013
Post comments count 0
Post likes count 0

Introducing ‘Vector Calling Convention’

Ankit Asthana
Ankit Asthana

Introduction In VS2013 (download here), we have introduced a new calling convention known as 'Vector Calling Convention' but before we go on and introduce the new calling convention let us take a look at the lay of the land today. There are multiple calling conventions that exist today, especially on x86 platform. The x64 platform has however been slightly blessed with only one convention. The following calling conventions are supported by the Visual C/C++ compiler (_cdecl, _clrcall, _stdcall, _fastcall and others) on x86. _cdecl is the default calling convention for C/C++ programs on x86. However x64 ju...

C++ REST SDK 1.1.0 is now available
Jul 10, 2013
Post comments count 0
Post likes count 0

C++ REST SDK 1.1.0 is now available

Sana Mithani
Sana Mithani

C++ REST SDK 1.1.0 has been released on CodePlex.  This version of the C++ REST SDK reintroduces the much anticipated the HTTP Listener library. Developers can now complete their REST story by creating their own server to respond to requests sent by client applications. For more information about this release and to view the sources, visit the project site at http://casablanca.codeplex.com. Project member, Kavya Kotacherry has published a blog about HTTP pipeline stages. Visit her post to learn more about some of the interesting features of the HTTP Client library.  Did you know that the C++ R...

Intercepting HTTP Request/Response using C++ Rest HTTP Library
Jul 10, 2013
Post comments count 0
Post likes count 0

Intercepting HTTP Request/Response using C++ Rest HTTP Library

Kavya Kotacherry
Kavya Kotacherry

We released the C++ REST SDK (codename "Casablanca") as an open source project on CodePlex in Feb 2013. It enables writing modern, asynchronous C++ code that can connect with REST services. Using the C++ REST SDK, you can create an HTTP client that can connect to HTTP server, send requests and handle responses. The following links are pre-requisites to get familiar with the C++ Rest SDK. The C++ Rest HTTP Library offers an interesting feature which allows you to intercept your HTTP requests and responses before sending it out on the wire. This is useful for many scenarios and allows application develope...

MFC support for MBCS deprecated in Visual Studio 2013
Jul 8, 2013
Post comments count 0
Post likes count 0

MFC support for MBCS deprecated in Visual Studio 2013

Pat Brenner MSFT
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...

Optimizing C++ Code : Constant-Folding
Jul 4, 2013
Post comments count 0
Post likes count 0

Optimizing C++ Code : Constant-Folding

Jim Hogg
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;...