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

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

Rate This
  • Comments 46

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 Support

Compiler

  • Supports the following ISO C++11 language features:
    • Default template arguments for function templates.
    • Delegating constructors.
    • Explicit conversion operators.
    • Initializer lists and uniform initialization.
    • Raw string literals.
    • Variadic templates.
  • rvalue/lvalue Reference Casts. With rvalue references, C++11 can clearly distinguish between lvalues and rvalues.  Previously. the Visual C++ compiler did not provide this in specific casting scenarios. A new compiler option, /Zc:rvalueCast, has been added to make the compiler conformant with the C++ Language Working Paper(see section 5.4, [expr.cast]/1).

The default behavior when this option is not specified is the same as in Visual Studio 2012.

C99 Libraries

  • C99 functionality added to <math.h>.
  • Complex math functions in new header, <complex.h>.
  • Integer type support in new header, <inttypes.h>; includes format string support for "hh".
  • Support for variable argument scanf forms in <stdio.h>. C99 variants of vscanf, strtoll, vwscanf/wcstoll, isblank/iswblank implemented.
  • New conversion support for long long and long double in <stdlib.h>.

Standard Template Library 

  • Support for the C++11 explicit conversion operators, initializer lists, scoped enums, and variadic templates.
  • All containers now support the C++11 fine-grained element requirements.
  • Support for these C++14 features:
    • "Transparent operator functors" less<>, greater<>, plus<>, multiplies<>, and so on.
    • make_unique<T>(args...) and make_unique<T[]>(n)
    • cbegin()/cend(), rbegin()/rend(), and crbegin()/crend() non-member functions.
  • <atomic> received numerous performance enhancements.
  • <type_traits> received major stabilization and code fixes.

Visual C++ Library Enhancements

  • C++ REST SDK is added. It has a modern C++ implementation of REST services. For more information, see C++ REST SDK.
  • C++ AMP Texture support is enhanced. It now includes support for mipmaps and new sampling modes.
  • PPL tasks support multiple scheduling technologies and asynchronous debugging. New APIs enable the creation of PPL tasks for both normal results and exception conditions.

C++ Application Performance

  • Auto-Vectorizer now recognizes and optimizes more C++ patterns to make your code run faster.
  • ARM platform and Atom micro-architecture code quality improvements.
  • __vectorcall calling convention is added. Pass vector type arguments by using the __vectorcall calling convention to use vector registers.
  • New Linker Options. The /Gw (compiler) and /Gy (assembler) switches enable linker optimizations to produce leaner binaries.
  • C++ AMP shared memory support to reduce or eliminate data copying between CPU and GPU.
  • Profile Guided Optimization (PGO) enhancements:
    • Performance improvements from a reduction in the working set of apps that are optimized by using PGO.
    • New PGO for Windows Store app development.

Windows Store App Development Support

  • Support For Boxed Types In Value structs. You can now define value types by using fields that can be null—for example, IBox<int>^ as opposed to int. This means that the fields can either have a value, or be equal to nullptr.
  • Richer Exception Information. C++/CX supports the new Windows error model that enables the capture and propagation of rich exception information across the application binary interface (ABI); this includes call stacks and custom message strings.
  • Object::ToString() Is Now Virtual. You can now override ToString in user-defined Windows Runtime ref types.
  • Support For Deprecated APIs. Public Windows Runtime APIs can now be marked as deprecated and given a custom message that appears as a build warning and can provide migration guidance.
  • Debugger Improvements. Support for native/JavaScript interop debugging, Windows Runtime exception diagnosis, and async code debugging (both Windows Runtime and PPL).

Diagnostics Enhancements

  • Debugger Improvements. Support for async debugging and Just My Code debugging.
  • Code Analysis Categories. You can now view categorized output from the Code Analyzer to help you find and fix code defects.
  • XAML Diagnostics. You can now diagnose UI-responsiveness and battery-usage issues in your XAML.
  • Graphics and GPU Debugging Improvements.
    • Remote capture and playback on real devices.
    • Simultaneous C++ AMP and CPU debugging.
    • Improved C++ AMP runtime diagnostics.
    • HLSL Compute shader trace debugging.

3-D Graphics Enhancements

  • Image Content Pipeline support for pre-multiplied alpha DDS format.
  • Image Editor uses internally pre-multiplied alpha for rendering, and thereby avoids rendering artifacts such as dark halos.
  • Image and Model Editors. User-defined filter creation is now supported in Shader Designer in Image Editor and Model Editor.

IDE and Productivity

The Visual Studio IDE has significant improvements to help you be more productive when you code in C++.

  • Improved Code Formatting. You can apply more formatting settings to your C++ code. By using these settings, you can control new-line placement of braces and keywords, indentation, spacing, and line wrapping. Code is automatically formatted when you complete statements and blocks, and when you paste code into a file. To modify formatting settings, on the menu bar in Visual Studio, choose Tools, Options, expand the Text Editor, C/C++, and Formatting nodes, and then make your changes. You can also use the Quick Launch box to access these options.
  • Brace Completion. C++ code now auto-completes the closing characters that correspond to these opening characters:
    • { (curly brace)
    • [ (square bracket)
    • ( (parentheses)
    • ' (single quote)
    • " (double quote)
  • Additional C++ Auto-completion Features.
    • Adds semicolon for class types.
    • Completes parentheses for raw string literals.
    • Completes multi-line comments (/* */)
  • Find All References now automatically resolves and filters references in the background after it displays the list of textual matches. To disable reference resolution, on the menu bar in Visual Studio, choose Tools, Options, expand the Text Editor, C/C++, and Advanced nodes, and change the Disable Resolving setting under References.

To modify the brace-completion settings, on the menu bar in Visual Studio, choose Tools, Options, expand the Text Editor, C/C++, and General nodes, and then make your changes. You can also change the settings for all Visual Studio languages by expanding the Text Editor, All Languages, and General nodes.

To modify specific C++ settings, on the menu bar, choose Tools, Options, expand the Text Editor, C/C++, and Advanced nodes, and then make your changes.

  • Context-Based Member List Filtering. Inaccessible members are filtered out of the IntelliSense member lists. For example, private members are not displayed in the member list unless you are modifying the code that implements the type. While the member list is open, you can press Ctrl+J to remove one level of filtering (applies only to the current member list window). You can press Ctrl+J again to remove the textual filtering and show every member.
  • Parameter Help Scrolling. The displayed function signature in the parameter-help tooltip now changes based on the number of parameters you've actually typed, rather than just showing an arbitrary signature and not updating it based on the current context. Parameter help also functions correctly when it's displayed on nested functions.
  • Toggle Header/Code File. You can now toggle between a header and its corresponding code file by using a command on the shortcut menu, or a keyboard shortcut.
  • Resizable C++ Project Properties Window.
  • Auto-generation of Event Handler Code in C++/CX and C++/CLI. When you are typing code to add an event handler in a C++/CX or C++/CLI code file, the editor can automatically generate the delegate instance and event-handler definition. A tooltip window appears when event-handler code can be auto-generated.
  • DPI Awareness Enhancement. The DPI Awareness setting for application manifest files now supports the "Per Monitor High DPI Aware" setting.
  • Faster Configuration Switching. For large applications, switching configurations—especially subsequent switching operations—execute much more quickly.
  • Build Time Efficiency -- faster builds. Numerous optimizations and multi-core utilization make builds faster, especially for large projects. Incremental builds for C++ applications that have references to C++ WinMD are also much faster.
  • Simon Dan: I looked at our internal database, and it appears that the compiler back-end team fixed Connect#776310 on April 14, so the fix should have gotten into Preview. Can you verify?

    Impatient user: That was fixed on January 3, so it definitely got into Preview.

    Johnny Willemsen: You need to report bugs NOW, otherwise we may not be aware of the ones affecting you, and we may not be able to fix them for RTM.

    Seriously, report bugs now. Now now now. We've announced that we're releasing RTM in calendar year 2013. As usual, we gradually lock down the product long before it ships. That means the window for getting fixes into RTM is relatively narrow.

    Dan Bartlett: Looking at my E-mail archives, the compiler back-end team confirmed that __vectorcall is available on x64.

  • Are there non-obvious behavioral changes that /Zc:rvalueCast introduces? The other Zc are more obvious 1) the benefit, 2) how it could silently break code in non-obvious ways.

  • @Stephan

    Thanks but any fix about it is not in the Preview. However another buddy told me that the compiler in the Preview version is an earler version a little far from the current developing one. I don't know how earlier it was but it can still make sense because that bug report is marked as 'delayed' at that time. There are other bug reports earlier or later than that one that has actually been fixed (based on the testing results with Preview version) but are still been marked as unsured results. Any way you say it has been fixed then i suppose it has. I believe you as always.

  • Simon Dan: I just checked our internal builds, and your test case is still emitting incorrect output. I'll bring this to the BE team's attention.

  • @Stephan

    Cool. and thanks.

    @Michael

    Look at this code and you may test by yourself:

    // ConsoleApplication1.cpp : Defines the entry point for the console application.

    //

    #include "stdafx.h"

    #include <conio.h>

    #include <iostream>

    void foo(int &)

    {

    std::cout << "lvalue call" << std::endl;

    return;

    }

    void foo(int &&)

    {

    std::cout << "rvalue call" << std::endl;

    return;

    }

    struct tag {};

    void foo1(tag &)

    {

    std::cout << "lvalue call" << std::endl;

    return;

    }

    void foo1(tag &&)

    {

    std::cout << "rvalue call" << std::endl;

    return;

    }

    int _tmain(int argc, _TCHAR * argv [])

    {

    long i = 0;

    int j = 0;

    tag o1;

    foo((int)i);

    foo((int)j); // '/Zc:rvalueCast'.

    foo1((tag)o1);

    _getch();

    return 0;

    }

    you will get 'lvalue call' at the second 'foo' execution when the '/Zc:rvalueCast' hasn't been specified, or all 'rvalue call' if the option has.

  • @Olaf van der Spek:

    It DOES have non-static member initializers.

  • Nothing for us guys still working with MFC legacy apps then?

  • How to distinguish VS2013 Preview compiler and RTM?

  • Arkadiy Shapkin: Use _MSC_FULL_VER, documented on MSDN.

  • I've run into several situations where I can crash the 2013 C++ compiler (with segfaults). Is reporting these through Windows' built-in crash reporting mechanism enough to ensure the details get to the right people?

  • Porges: That information from Windows Error Reporting eventually makes its way to us, but it's difficult to act on - we don't get to clearly see what sources you're compiling. Filing a bug through Microsoft Connect with a self-contained test case makes it a million times more likely that we'll be able to fix the bug. The compiler devs can take your code and run it through their compiler-assertions-enabled build and see exactly what's happening (they can even build the compiler without optimizations altogether to make debugging easier).

  • Can you respond to this:

    gynvael.coldwind.pl

  • Hey guys!

    Here's a thought for vastly improving the flexibility of the

    C++ compiler in this Cloud-Based world. How about a couple of

    pragma statements that allow the specification of Internet based

    search paths for header files and library modules?

    They might have this signature:

     #pragma headers <uri>

     #pragma libraries <uri>

    Also you might consider an option for caching specific headers

    and library modules locally, in case the Internet is unavailable

    to the programmer for a while.

    Just a thought...

    Regards,

    dave-wellsted@outlook.com

  • Since the couple MFC questions remain unanswered and it is barely mentioned in the what's new for 12 and 13, maintenance things only, I have to assume that MFC has one foot out the back door already....

  • Hi,

    Is there any benchmark set (C++ codes) that can demonstrate the improvement of auto-vectorizor or auto-parallelization? Or, I don't know how to change my codes to have this benefit. Thanks.

    Alex

Page 3 of 4 (46 items) 1234